Most voted "asp.net-mvc-5" questions
This tag should be used when the question refers to some features only available in version 5 (currently the latest) of ASP.Net MVC. ASP.NET MVC is an open-source Microsoft framework that implements the Model View Controller architecture standards for web development. Based on ASP.Net, allows software developers to build web applications following the Model View Controller architecture standards.
Learn more…937 questions
Sort by count of
-
1
votes1
answer693
viewsUnderstanding the DDD Concept
Good, I’m starting a new application, relatively simple, and I want to structure it into the DDD concept. I have read a lot on the Internet, I have seen many examples and meanings, but I would like…
-
1
votes1
answer414
viewsForm validation ASP.net mvc!
I have a form that validates the fields when trying to send information, only I have a "novapagina" option where I would not like to validate the fields, this would be possible? In the views <div…
-
1
votes1
answer617
viewsView with 2 model inside a Viewmodel
Goal: Manipulate 2 model in the view using a Viewmodel. I made a Viewmodel to encapsulate the 2 models, but I can’t use one of them. Viewmodel: public class BoletoConfigViewModel { public Boleto…
-
1
votes1
answer855
viewsC# Error Nullreferenceexception in Tolist() method
I am working on a C# MVC WEB project with Entityframework. I was able to configure it together with the database and also installed Ninject. The first controller I’m working on is Users. I want to…
-
1
votes3
answers2378
viewsSend a List<T> with multiple items to the controller
Well, I’m facing the following problem in a project I’m working on: how to pass a list (List) with approx. 500~1000 View lines for the Controller? Actually, this list of mine has a field called…
-
1
votes0
answers212
viewsASP.NET MVC Project does not work on Godaddy Hosting Windows Plesk
Hello, I’ve read enough questions here and I’ve tried everything, but my MVC application does not run anymore with prayer on the Godaddy server, I’ve changed the file permission, I’ve entered the…
-
1
votes1
answer63
viewsView inside an area as default in MVC
How can I make a view inside an area the default when running the application? Error I am getting: My structure: My file Routeconfig What I did below didn’t work. namespace WebApplication1 { public…
-
1
votes1
answer75
viewsHow to use 4 model in a view
Hi, I’m 4 class Cliente, Locacao, Item and Cacamba: public class Cliente { public Guid ClienteID { get; set; } public string Nome { get; set; } ............... } public class Locacao { public Guid…
-
1
votes1
answer55
viewsDebug Lazy loading
Sirs, I would like to view all queries that are generated when I use Lazy loading. When debugging view only the main. In the Training controller this way: public class TreinamentosController :…
asp.net-mvc-5asked 8 years, 5 months ago Torres 13 -
1
votes1
answer129
viewsSave uploaded data from a partialView
I have a PartialView with BeginCollection where I upload a list of products to Dropdowns dynamic: In this project I have a relationship ManyToMany between Product and Supplier where I have the…
-
1
votes1
answer97
viewsHighlighting does not work in Razor MVC 5 views
I’m with a Razor ASP.NET MVC 5 project that was created on VS2013 on another computer. Loading it on my computer with VS2012 Highlighting and Views Intellisense (cshtml) does not work. I realized…
-
1
votes0
answers153
viewsSystem.Data.Sqlclient problem while upgrading to aspnet 5 core
I updated my entire project to aspnet 5 core because I was using dnx vnext and apparently everything worked fine, but I performed tests and noticed that some values were not correct and when…
-
1
votes1
answer321
viewsMVC5(Asp.Net4.5.2)- Redirecttoaction does not work in a single case
In my Account controller, in Action Login, I have the code below: case "Sucess": string rule = CheckRule(model.username, model.Password); Response.SetCookie(SetAuthCookie(model.username,…
-
1
votes1
answer260
viewsHow to assign Combobox value to variable?
I am customizing the user registration part using the Entity Framework Identity tool. So on the registration page, I added a ComboBox (Select in HTML): Part of my View: <div…
-
1
votes1
answer115
viewsJquery is returning Undefined to one of the generic properties I created
Jquery is returning Undefined to one of the generic properties I created, to use with Bootgrid. I’m trying to load a modal according to the event click one of the buttons on the grid, but the modal…
-
1
votes1
answer566
viewsListing the return of a Viewbag for View?
Following the instructions of this post (Return the data to the View using Json.net or javascript-Asp.net mvc) answered by Loudenvier was like this: Class: public class TB_RECEBE_IMAGENS { public…
-
1
votes0
answers240
viewsHow to make access permissions via Authorizeattribute
I’m researching how to implement an access control in my web application. I am using Asp.Net MVC with Identity, the idea is that a certain user can only access certain page. So, in research I found…
-
1
votes1
answer691
viewsASP NET MVC 5 Dapper with SQL Server?
I’m creating an app with ASP.NET MVC5, DAPPER, C# And SQL SERVER. The problem, is that in the data listing, is bringing the empty fields, except the ID field, which comes zero (0). If anyone knows…
-
1
votes1
answer376
viewsHow much to use @Html.Actionlink or Javascript
I’m having trouble understanding when to use a @Html.ActionLink or javascript:document.getElementById('Comercial').submit() For example: <a><i class="fa fa-home"></i> Home <span…
-
1
votes1
answer212
viewsProblem with route routing Asp.net mvc
I have the following route, where I get the representative’s id: http://localhost:18568/Representative/Index/1 So it’s working, but I’d like to show the representative’s name…
-
1
votes1
answer125
viewsHow to send a special character to the view , Asp.net mvc?
I have a situation where I would like to position the page in the same position as the container I was in before sending the Get? Example : <!-- ==== contato ==== --> <div class="container"…
-
1
votes1
answer685
viewsDisplay balloon popup on a label
I would display a small message to the user, style those when passing the mouse, if I am not mistaken would be the attribute alt="my message" however I am using Asp.net-mvc-5 and I am finding it…
-
1
votes2
answers996
viewsMetodo Json - Return
I am developing a return of Zip Code through the post office API, the part that is in the controller is working, but I do not know if the return is correct, nor how to use in the view. If anyone can…
-
1
votes1
answer2059
viewsDisplay alert when loading page
I’m using Asp.net-mvc and as far as I know the Onload event would work if I put in body, which is in ~Layout, but I need this alert to be displayed in a single page, because if I put in body will…
-
1
votes1
answer1179
viewsSet Value in a @html.Dropdownlist
In an address registration form, I’d like to do the following. the guy types the zip code, then searches the zip code, and returns the data to fill in the Editorfor. So far so good, it’s working.…
-
1
votes1
answer174
viewsLoading Renderaction within _Layout
How do I load data from a model inside in my _Layout? I have a standard layout for all views of my project where in this layout lies the div where is the user photo that is in my application at the…
-
1
votes1
answer395
viewsHow to fill in an Editorfor as the login user name
I have a View, where the user must fill in some fields, and has a last field that I left him disable, and would like that in this field appears the name of the user, but how do I fill? Model: public…
-
1
votes1
answer88
viewsRequest performance using Html.Beginform versus jQuery AJAX
There is some performance gain when using jQuery to perform ajax requests relative to the post using Html.Beginform? @using (Html.BeginForm("Create", "Teste") { @Html.AntiForgeryToken()…
-
1
votes1
answer443
viewsFill a list with Json return
I wanted to fill in a textarea or anything that looks like a list, with the items that the guy selects from a dropdow. So I thought so, but I don’t know how to feed the list... <textarea cols="1"…
-
1
votes1
answer265
viewsPass ID to Controller
I have the problem that when I click on the Register button, the City does not pass the ID. I did. The ID is being passed to the screen, but when passing to the controller is not. <div…
-
1
votes3
answers145
viewsAvoid editing in the field
I am trying to do the following: the user type his zip code, and then it is filled automatically, estado(select) cidade(select), rua(input) and bairro(input), when the user enters his zip code and…
-
1
votes2
answers393
viewsMessage to the user in Label with Jquery
I’m validating the registered user’s email, and I want to display the message to him if the email already exists, so I did so: //validação de email $(function validateEmail() {…
-
1
votes1
answer68
viewsError when registering user
When I try to create a second user, with ASP.NET MVC, presents me with a mistake: Violation of PRIMARY KEY Constraint 'Pk_dbo.Aspnetusers'. Cannot Insert Duplicate key in Object 'dbo.Aspnetusers'.…
-
1
votes2
answers448
viewsSQL Injection or Script Injection - MVC-5 - Is it a concern?
I am developing an application in MVC-5 and read several articles about SQL Injection. I wonder if I have to take any security measures or modify my selects commands, or if in fact the MVC-5 already…
-
1
votes1
answer129
viewsDatabase insertion problem - SQL
Follows the code: Update command works: int noOfRowUpdated = ctx.Database.ExecuteSqlCommand("Update Mapa set Geo = geography::Point(47.65100, -122.34900, 4326) where Id= 1"); What does not work is…
-
1
votes1
answer97
viewsMVC 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, by clicking on a dropdown value, I make an asynchronous query to popular the next dropdown. I refer to the…
-
1
votes1
answer572
viewsSynchronous Xmlhttprequest on the main thread is deprecated because of its detrimental effects to the end user’s Experience
When I include @Scripts.Render("~/bundles/jqueryval") at the bottom in partialview I get warning on log: Synchronous Xmlhttprequest on the main thread is deprecated because of its detrimental…
-
1
votes3
answers1521
viewsCannot implicitly Convert type 'string' to 'int'
protected void btnSave_Click(object sender, EventArgs e) { List<ProdutoAmortizacaoCreditoDias> aDay = new List<ProdutoAmortizacaoCreditoDias>(); ProdutoAmortizacaoCreditoDias ee = new…
-
1
votes1
answer352
viewsHow to pass parameter to Index from another Controller
I have to pass a parameter (ID) to a controller’s index, I tried to use the ActionLink but it didn’t work. View: <body> <table class="table"> <tr> <th>…
-
1
votes1
answer87
viewsHow to pass "Isauthenticated" parameter to actionfilter?
I’m trying somehow to pass parameter to actionfilter. Please follow the code: Controller: [LogActionFilter(IsAuthenticated = Request.IsAuthenticated)] //Tentativa 1…
asp.net-mvc-5asked 7 years, 8 months ago Matheus Miranda 5,375 -
1
votes2
answers189
viewsInclude 2 Yen in 1 View!
Hello I’m new here and I’m having problems with my application! I want to list 2 list in a view (Promotions and Releases). The code is like this! (promotion class) namespace…
asp.net-mvc-5asked 7 years, 8 months ago Roger F. Ferrer 11 -
1
votes1
answer149
viewsThe Viewdata item that has the key 'Fabricanteid' is of type 'System.Int64' but must be of type 'Ienumerable<Selectlistitem>
I am trying to develop an application in ASP.NET MCV 5. This excerpt is returning this error message. @Html.DropDownList("FabricanteId", null, htmlAttributes: new { @class = "form-control" })…
-
1
votes1
answer79
viewsConvert View to Controller Values
I need you to byte[]Descricao, when sent to my view displays the text as string for the user to manipulate within the TextArea, when I click in saving need to be converted again to byte[] for that…
-
1
votes1
answer159
viewsBootstrap class does not work with htmlhelper
I am now starting to work with MVC, Razor, Bootstrap etc., and am having a design problem. These 2 textarea are using the same classes, everything is the same, except that in one I carry value of my…
asp.net-mvc-5asked 7 years, 6 months ago Vagner Santos 31 -
1
votes0
answers255
viewsYou doubt about Ubmit and jquery?
I am developing an application in Asp.Net MVC and I am having a problem that I am not able to solve. I have a form with 2 buttons submit, and when I do the submit I want to get the name of the…
-
1
votes1
answer1478
views@Html.Dropdownlistfor how to set the default value
I need to set the default value displayed by a @Html.DropDownListFor Researching found: @Html.Dropdownlistfor how to set default value So I did it in my code: @Html.DropDownListFor(model =>…
-
1
votes2
answers213
viewshelp for View to pass multiple lines to a Controller
Guys, I have a simple model for studies. There are 3 tables, Person, Allergy and Personal Allergy. Since a person can have several allergies. My role model is: public partial class Pessoa {…
-
1
votes2
answers263
viewsHow to enter data with JSON and MVC5
I have a registration screen, where the user can insert as many emails as he wants in each record. For this, in my View I have the following code <div class="form-group"> <button…
-
1
votes1
answer187
viewsProblem running method to insert new User using ASP.NET MVC with HTML and RAZOR
I have a problem running a request to enter a new user, I do not know what I need to do now to finalize my request, By clicking the sign up button nothing happens below are my HTML code and the…
-
1
votes1
answer1338
viewsAsynchronous module or handler completed while asynchronous operation was pending
I am trying to send an email asynchronously, without waiting for the return. However when I do not use the await I get an exception in return for action. Code: public Task MissaoAvaliada(string…