Questions tagged as 'asp.net-mvc'

1
answer

What are the actions of a controller?

In this answer Gypsy says    This (example) is good here when you have multiple Actions on the Controller What are the Actions of a Controller ? Note: I would like some code example too, defining a controller with two or more a...
asked by 21.10.2015 / 18:35
1
answer

Filter in DropDown using C # MVC 4

I have a dropdown in my view that I fill in as follows: ViewBag.NfeStatus = EnumHelper .ListAll<NfeStatus>() .ToSelectList(x => x, x => x.Description()); My NfeStatus model is an enum: public enum NfeStatus {...
asked by 17.01.2017 / 12:33
1
answer

A possibly dangerous value Request.Form was detected on the client

I have a problem when I send this type of input in the input field: &&&&%$&#_(@)(#_!**@#)24 R87R XDHNSIFN 89Q7201784 The Resquest.Form error occurs. Error Message: ControllerusingSystem;usingSystem.Collections.Gener...
asked by 19.06.2015 / 15:13
3
answers

Update generating duplicate key error

I have a web application in .net 4.5.1 with MVC and entity framework. The error occurs in a basic CRUD. I retrieve the object that will be the model sent to the view with the following code: Professor professor = db.Pessoa .I...
asked by 03.02.2014 / 22:15
3
answers

What difference between DropDownListFor and DropDownList

What is the difference between DropDownListFor and DropDownList? And when and which one to use?     
asked by 11.02.2015 / 13:20
2
answers

How to redirect from non-www to www?

I want visitors to my site to always access with www . I want to somehow redirect in case the user tries to log in without www or subdomain. If you try to access exemplo.com I want to redirect to www.exemplo.com ....
asked by 11.12.2013 / 23:17
2
answers

Where to create a Helpers layer?

I need to create a Helpers layer that will contain classes that will be made available for the entire project. These classes will contain functions like calculations, string cleaners, in short, those functions we use all the time ......
asked by 28.02.2018 / 10:59
1
answer

What is ADO.Net for C #?

I'm starting to learn about C # for Web applications, and wanted to know what is ADO.Net and what are the advantages of using it?     
asked by 04.10.2015 / 17:25
2
answers

What is the purpose of automatically generated directories in an ASP.NET MVC project?

In Visual Studio Community 2015 when we create a new project in ASP.NET MVC in the project the following directory structure is automatically generated, see the image below: Being in total eight directories. Question I would like...
asked by 28.10.2016 / 03:49
4
answers

Maximum ASP.Net MVC request size

I'm uploading Image using JQuery. I have limited the image to a maximum of 2mb, however when I send an image larger than 2mb, an exception is made saying Maximum request size exceeded. What I did: function fileUpload() {...
asked by 30.03.2016 / 22:23