Questions tagged as 'asp.net-mvc'

2
answers

Binding in text field

In my project I have some tables between them one of occurrences and one of users, where a relationship between them of several occurrences for a user. What happens is that when registering an occurrence I have to reference the user, so that'...
asked by 03.12.2014 / 14:30
2
answers

Application Security Change for Medium Trust

Recently I uploaded a system I created in Asp.Net using MVC and Entity to the KingHost web server. On localhost and on my own server it works normally. When trying to access the application on the KingHost server, it gives the following error:...
asked by 22.01.2015 / 12:30
2
answers

How to use folder to store images in a Api Web project published in Windows Azure?

I have a folder created at the root of a Web Api project named Images . At localhost I write them as follows: File.WriteAllBytes(HttpContext.Current.Server.MapPath("~/Images/") + image.Name, image.Image); To display the...
asked by 03.07.2014 / 01:38
2
answers

How to return an int in a Decimal property

I have a SQL string (made by another programmer a long time ago so I can not change it) which returns something like this: If it has value in the column, it returns the value, otherwise it returns 0 (I would post the SQL here but it's gigantic.)...
asked by 01.07.2014 / 15:41
2
answers

Transforms string into decimal within an object

I made a ViewModel, where in the database the CPF field is decimal (11,0) and in the VM I put it as String. In my API the CPF is decimal. Well, when I fill in the field and send the form to the API, the value of the CPF arrives with 0.0. This is...
asked by 13.08.2018 / 14:11
2
answers

Date field autocompletion in the application

I have a form in my C # ASP.Net application where I need to fill in an end date, but I want to standardize so that the end date is always 5 days after the start date. How to do this? I believe that a Javascript would solve, but I have no experie...
asked by 29.08.2014 / 20:57
2
answers

How to access from another computer the application running on localhost

I have a web application made in ASP.NET MVC 5, and I gave it a start in Visual Studio 2013, the address of the Index page was thus on the machine where it is running: http://localhost:51144/ . How do I get another network computer to a...
asked by 18.06.2014 / 14:44
2
answers

Explanation in constructor method

I have some doubts in the constructor method of a class that I'm seeing as an example, if anyone can explain thanks. private static IList<Categoria> categorias = new List<Categoria>() { new Categoria() {...
asked by 28.02.2017 / 14:41
1
answer

Pass two parameters - ASP.NET CORE

I need to pass two parameters to a page, when I'm trying to pass one, I do it this way: <a asp-page="/ContaReceber/Edit" asp-route-id="@item.Id;" class="btn btn-sm btn-success">Editar</a> I tried to pass something like: <a...
asked by 05.07.2018 / 16:30
3
answers

MVC: parameter in URL is not being passed to controller

I'm running the Action below, but the "CategoryObject" parameter is not being passed to the Controller. I'm working with asp.net core 2.0. public async Task<IActionResult> Buscar(string ArtigoOuCategoria) { ... } The Action call i...
asked by 08.07.2018 / 19:16