Questions tagged as 'asp.net-mvc-5'

1
answer

MVC 5 Ajax.ActionLink returns result, but does not render in DOM

Gentlemen, I'm having trouble displaying a list of results in my view. The idea is, when I click on a value from a dropdown, I make an asynchronous query to populate the next dropdown. I would refer to the controller by the Ajax.ActionLink me...
asked by 07.01.2017 / 18:56
2
answers

Message for user in Label with Jquery

I am doing validation of the registered user's email, and I want to display the message to him in case the email already exists, so I did this: //validação de email $(function validateEmail() { $('#Email').change(function () {...
asked by 18.12.2016 / 15:22
1
answer

Pass ID to Controller

I have the problem that when I click the Register button, the City does not pass the ID. Made. The ID is being passed to the screen, but at the time of passing to the controller not. <div class="alinhado col-md-4"> <div class="for...
asked by 15.12.2016 / 20:40
1
answer

How to fill an EditorFor as the username of the logged in user

I have a View , where the user must fill some fields, and have a last field that I left it disable , and I would like this field to appear the user name, however how do I fill in? Model : public class CombustivelModels {...
asked by 30.11.2016 / 19:05
1
answer

Is it possible to pass the value of a Javascript variable to a C # variable?

The idea is as follows, use javascript to detect the screen resolution, and get the value of the variable of this javascript and move to the C # variable. The only thing that got into my head is to create an input to manipulate the variables, bu...
asked by 25.12.2016 / 19:50
2
answers

Getting information from a select and passing in an array

I want to get all fields of a select and store them in array . I thought about doing it, but it did not work. var lista = []; lista = $('#Model').text(); $('#Model').append('<option value="' + data.ModelID + '">' + data.N...
asked by 21.12.2016 / 22:57
1
answer

Display Alert Loading Page

I'm using asp.net-mvc and as far as I know the OnLoad event would work if I put it in body, which is in ~ Layout, but I need this alert to be displayed on a single page, because if I put in body it will run all instead ... how can I do it? Vi...
asked by 20.11.2016 / 20:40
1
answer

How to pass parameter "IsAuthenticated" to actionfilter?

I'm trying somehow to pass parameter to actionfilter . Please follow the code: Controller: [LogActionFilter(IsAuthenticated = Request.IsAuthenticated)] //Tentativa 1 System.Web.HttpContext.Current.Request.IsAuthenticated ActionF...
asked by 07.03.2017 / 19:33
1
answer

View Ocutar Password using EditorFor

I'm using LabelFor, I wanted to click on the above to enter the password, the characters were displayed, and when I clicked off it was hidden, how could I do it? <div class="form-group"> @Html.LabelFor(model => model.Senha, htmlAt...
asked by 13.11.2016 / 00:12
1
answer

Edit Div content

I have a index , which displays the data of my database, I wanted to click on div , open a modal, that would allow to change that value of div . Code of view : <div style="float:left; max-width:200px;max-height:200...
asked by 14.11.2016 / 04:54