Questions tagged as 'asp.net-mvc'

1
answer

When deleting the name in the model is not shown

I made an action to delete and delete, but in View delete does not appear the value of the field, which comes from the model. This is cshtml: @model TreinamentoCrud.Models.Cidade @{ ViewBag.Title = "Delete"; } <h2>Delete</h2>...
asked by 09.08.2018 / 20:58
1
answer

Pass two sets of values from AJAX to controller

I need to pass the values of a view model, and a table, the table is passing normally, when passed alone, the viewmodel does not. Here's how I'm doing: var model1 = objectifyForm(model); console.log(model1); debugger; $.ajax({...
asked by 27.08.2018 / 21:52
1
answer

Server configuration asp [closed]

Good afternoon. I am venturing into a server asp, only that I am lost in your configuration. As dev php, I put an index.php on an asp server waiting for it to work, though it did not work. Looking for more, I realized that I should configure web...
asked by 23.07.2018 / 21:55
1
answer

Error passing parameter through GetAsync method

How do I pass the login object as a parameter to the GetAsync method? I'm trying to do it this way, but I did not understand the error message: private async Task<JsonResult> obterLogin(Login login) {...
asked by 27.07.2018 / 15:43
1
answer

How to perform submit select list view for Controller?

I have the following code in my view: @using (Html.BeginForm("DataAniv", "Mailing", FormMethod.Post)) { <div class="form-group"> <label for="sel1">Selecione o mês:</label> <select class="form-contro...
asked by 02.08.2018 / 16:16
3
answers

Window Modal BootStrap does not display styles in components - Asp.net MVC

I have a problem that I can not solve for months! I'm using a package of bootStrap and JS styles, in which I referenced them in my _Layout. On all the pages that are rendered and inherit from the Main page, everything works without problems. Jus...
asked by 29.06.2018 / 13:23
1
answer

Upload select via ajax

I'm trying to load a select via ajax, here's how I'm doing: HTML: <select id="cbplanos" class="form-control"></select> Controller code: public async Task<IActionResult> Load() { var lista = _context....
asked by 29.06.2018 / 14:22
1
answer

Load input text after selecting select

I have a select that is being populated via ajax, when I open the modal, I call the function that loads the select, and it is working perfectly. But I need a cascade type effect in the first field, and when changing, it changes the input text...
asked by 29.06.2018 / 14:53
2
answers

Call a method every time a Controller fires asp.net mvc

In my project I have a method that creates a menu in the Layout.cshtml layout page, for example, in my control HomeController.cs is this method, and in ActionResult Index() I call this method, only I have several other ActionRe...
asked by 27.05.2018 / 19:48
1
answer

API problem after doing deploy

My api is not working after deploy to the server, it is returning:    404 - File or directory not found.      The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable. By doing some te...
asked by 23.05.2018 / 23:36