Questions tagged as 'asp.net-mvc'

1
answer

Get or return a variable for the angle

I have a method where I do a certain validation and depending on the scenario, I need to return only one alert and continue with the request or a possible BadRequest also returning a message. I thought of trying to access a variable within...
asked by 22.05.2018 / 14:24
1
answer

Save form Razor

How can I make for my form not to do sumbit of the same form several times. I'm having this problem because some users are clicking save multiple times, not waiting for the update screen, so then you are saving multiple duplicate records. I f...
asked by 30.05.2018 / 22:25
1
answer

Change only edited columns

In an application I'm developing, when trying to perform the update only on the fields that have been changed the Entity Framework is also changing the fields that do not need. Repository code: public void Update(T entity) { m_Context.En...
asked by 22.06.2018 / 00:49
1
answer

ASP.Net and C # - Reducing DropDownList options according to current date

On my client's site, I have on one page a DropDownList with the months of the year. Unfortunately, the value property is written in months rather than numbers. <asp:DropDownList ID="ddlMesReajuste" runat="server" AppendDataBoundItems="true"...
asked by 21.06.2018 / 16:53
1
answer

When injecting a dependency into the controller, Postman returns an error

When doing this in my Controller : [Route("api/[controller]")] public class OptOutClientController : Controller { IOptOutService _service; //Se comentar o construtor dá certo public OptOutClientController...
asked by 21.06.2018 / 19:48
1
answer

Create new file discarding current XML lines C #

I have an XML file like this: <?xml version="1.0" encoding="UTF-8"?> <Message> <MessageId> <ServiceId>SolicitaLogon</ServiceId> <Version>1.0</Version> <MsgDesc>Solicitação do...
asked by 16.06.2018 / 06:29
1
answer

Request sent more than once when selecting a form field

When I select some specific field of a form, I trigger a request to load some essential information to complete the form, but when selecting a form field it triggers 3, 4 requests and this causes my data of an option for example get duplicates i...
asked by 11.04.2018 / 13:41
1
answer

Pass HttpPostFileBase as parameter in the API method

I have an APi that makes employee registration and also a photo, in the parameter I pass the object and an htttppostfilebase type, but when I send to api in my debug it is not even hitting the method, removing the parameter works. p> My API:...
asked by 07.04.2018 / 22:49
1
answer

Generate table automatically with c # and mvc

how to do the following (I do not have code yet). On the page, I have a table with a Row and 5 Columns and at the end of the table a button (+) and under the table a save button. The question is when I click the (+) button, should create ano...
asked by 06.04.2018 / 14:51
1
answer

How to get value from an Html.EditorFor

I have the following command @Html.EditorFor(m => m.DataDoDesligamento) On it is placed a date, and when clicking a button it should redirect to a report, except that I need to pass to the URL the parameter Data shutdown to send to the s...
asked by 11.04.2018 / 22:23