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
-
37
votes2
answers9287
viewsExample of ASP.NET Identity using SQL Server
I still only use the FormsAuthentication but I searched and did not find an example, even if minimal, in portuguese to talk about ASP.NET Identity for MVC. I’m using ASP.NET MVC 5 and…
-
31
votes1
answer8090
viewsInternationalization using ASP.Net MVC
How can I implement an internationalization system using Microsoft’s MVC technology? Is there something similar to Android so that my website can support several languages? Is there also some way to…
-
22
votes3
answers7874
viewsASP.NET MVC or Webapi?
What is the advantage of using MVC and Webapi (using Visual Studio and C#)? I think that developing in MVC is easier to assemble a form with validations, because just put special attributes for this…
-
19
votes1
answer6255
viewsAsp.Net Identity, how to use only Roles or Claims?
Returning to the same subject: ASP.NET Identity with Entityframework. Regardless of the size or planning of my project, if I need to use only the part of Roles or only the part of Claims, Is that…
-
15
votes5
answers17754
viewsHow to solve accent problems with ASP.NET MVC?
I’m having problems with accentuation in ASP.NET MVC 5. I am using Visual Studio 2013 Professional and in the application . Net 4.5. SQL Server 2008 and Entity Framework 6. The browser is Google…
c# asp.net-mvc asp.net-mvc-5 entity-framework visual-studio-2013asked 10 years, 8 months ago user3628 -
12
votes2
answers2381
viewsRouter and URL-friendly with Asp.net mvc
How I Route and url friendly (dynamically) in my web application, using Asp.net mvc 5? Currently I have the url: http://myapp.com/Produto/Details/7 And I want to route it so it looks like this:…
-
11
votes2
answers1359
viewsWhat changed from MVC4 to MVC5?
I have read some topics on the subject, some say that it has changed very little, others say that they were very important changes. I would like to know your opinion on the subject, currently I do…
-
10
votes1
answer9035
viewsScroll bar on a table with bootstrap
I have a table, where I upload database information into it. It has two columns (CNPJ and Social Reason). The table I mounted with bootstrap. I would like her to have a maximum height and create a…
-
10
votes2
answers1641
viewsIs it wrong to leave business rules on controllers?
I see in several code examples this, and even in the "standard" project that is created in visual studio, they leave a good part of the rule in the controller Is it wrong? When to use it? What is…
-
10
votes1
answer3515
viewsWhat is Partial View?
Using the Controller I can return a Partial View, JSON, string and other things. What is a Partial View? Is it widely used in projects? Why use it?
-
10
votes3
answers16306
viewsValidate Credit Card Number
How do I validate credit card numbers? I will not integrate with card operator, I just need to validate the number, as with the validation with CPF.
-
10
votes1
answer1055
viewsIIS mount server on PC at home
Hello, I need to know if I have how to set up, etc, the IIS in a notebook, so that when this notebook is connected in the company, it works as my server, so that I can access my ASP.NET MVC…
-
10
votes2
answers342
viewsRedirect from Http to Https on Owin + Oauth + Google Externallogin
Host where my application is hosted uses ARR to redirect all pages to Https. The problem is that the way the code of the asp.net mvc understands that the requisition is http, even though https. When…
-
9
votes1
answer1372
viewsPass two templates to a sign-up view
I have a login registration screen. I have to fill it with values registered in the database. Follows the codes: Models: public partial class Aba {…
-
8
votes3
answers1601
viewsBreadcrumb algorithm in ASP.NET MVC
I’m writing a system on Asp.net-mvc And the idea is that there’s a Breadcrumb on every canvas. With no ideas for a good algorithm, I created a Helper that returns a list of objects according to the…
-
8
votes2
answers1261
viewsHow to get all records from a mixed table generated by class inheritance when using Entityframework 6?
I have a class structure in the following form: public class Pessoa { public int Id {get; set;} public string Nome {get; set;} } public class Membro : Pessoa { public int CargoId {get; set;} public…
-
8
votes1
answer2897
viewsWhat is Bind(Include = "Property") used for?
By creating a CRUD with scalfold in ASP.NET MVC, in POST, we have the following code: public ActionResult Create([Bind(Include = "Id,Nome")] Grupo grupo) {...} What’s this one used for [Bind]? When…
-
8
votes1
answer591
viewsChange the naming pattern of views that are generated by scaffold
I would like to change the nomenclature where scaffold generates views: Standard: Create.cshtml Delete.cshtml Details.cshtml Edit.cshtml Index.cshtml I want scaffolding to create that way:…
-
8
votes1
answer1863
viewsEncrypt Web.config
I come here with a question about ConnectionStrings of Web.config. Seeing that normally, we inform a form of authentication on ConnectionStrings for the application to access the database. And by…
-
8
votes2
answers7119
viewsHow popular a Dropdownlist from another Dropdownlist
I need to know how to popular a Dropdownlist from another Dropdownlist. Example: I have a Dropdownlist called Project that takes information from my DB. When I select for example "Project 1" I need…
-
8
votes2
answers1697
viewsControl view component visibility in the ASP.NET MVC 5 controller
I am refactoring a project in ASP.NET MVC 5, implementing some good practices and researching, it was mentioned that the use of if na view(Razor) is not the best practice, only that I use it to show…
-
7
votes1
answer1281
viewsGood Practice when modularizing an application with EF and multi-bank
Let’s say I want to model an application on .NET using the EntityFramework as ORM and use one of its advantages, to be "generic" for several RDBMS. So, for example, I want my application to agree to…
-
7
votes2
answers5492
viewsRelationship 1 to 1 with Entity Framework
I have 2 entities: Equipamento and Databook. A Equipamento can only have one Databook and a Databook is only for a Equipamento. How can I make this relationship with Entity Framework? Follows the…
-
7
votes2
answers4616
viewsLogin with network user(AD)
I need to log the user into my system, with the user who is logged in to the company network. I’ve never done this and I’m having doubts about how to get users on AD. I’m doing research on the net…
-
7
votes2
answers3229
viewsHow to do this using @Renderbody from Asp.net MVC?
All screens in my system are Views and are rendered in @Renderbody in _Main layout I would like to change my layout and make it look like this: So, basically it’s like I explained in the image,…
asp.net-mvc-5asked 10 years, 2 months ago Rod 9,412 -
7
votes1
answer1024
viewsQuery user data logged in Windows Authentication
In my application I use the authentication mode="Windows" as a form of authentication. This way, I can know the user name, referring to the field in AD and the domain of the same using…
-
7
votes1
answer15160
viewsA potentially dangerous value Request.Form has been detected in the client
I’m having trouble sending this type of input in the input field: &&&&%$&#_(@)(#_!**@#)24 R87R XDHNSIFN 89Q7201784 Dangerous Resquest.Form Error occurs. Error message: Controller…
-
7
votes1
answer266
viewsProblems with IF in javascript
I’m a beginner in Asp.Net MVC, and I’m developing an application that manages Courses and in my screen of enrollment I’m trying to do a validation javascript what case the pupil is already enrolled…
-
7
votes1
answer605
viewsHow to login without using the Identity standard?
An update on Api of Facebook made the default login form of Identity stop working. The way I’m doing that stopped working is like this: public void ConfigureAuth(IAppBuilder app) {…
asp.net-mvc asp.net-mvc-5 api facebook asp.net-identityasked 7 years, 7 months ago Renan Carlos 1,594 -
6
votes2
answers387
viewsHow to create a View for this Template case?
I’ve been trying to apply the solution to this question (How to pass checkbox list to Actionresult) in a problem I’m having but I’m not getting a positive result. I’m getting an array with several…
-
6
votes2
answers7533
viewsThe sequence contains no elements
That’s the mistake that comes. An Exception of type 'System.Invalidoperationexception' occurred in System.Core.dll but was not handled in user code Below my expression that generated error: if…
asp.net-mvc-5asked 10 years, 7 months ago pnet 14,727 -
6
votes2
answers874
viewsHide different options (actions) for different user profiles
I am in a project where I have 3 different levels of profiles: Administrator, Professor and Coordinator. I already have the login module, registration and such. What happens is that I wanted for…
c# asp.net-mvc asp.net-mvc-5 razor visual-studio-2013asked 10 years, 6 months ago Érik Thiago 2,338 -
6
votes2
answers605
viewsWhat better way to organize and work with ASP.NET MVC routes?
What better way to organize and work with ASP.NET MVC routes? While we have 1, 2 routes, it’s quiet, but when do we have 500 ? 600 ? In an enterprise application there are many routes, which is the…
-
6
votes2
answers2534
viewsRendering Partials in ASP.NET MVC
I’m having a problem in my application where I wanted to use partial to render one page inside another. That is, one controller within another. Only, what happens is the partial does not render at…
-
6
votes1
answer7747
viewsHow to resolve the medium trust issue in Asp.net
I’m developing a website on Asp.Net MVC5. When posting the site on Locaweb and trying to log in with my user I received the message: Attempt by security transparent method…
c# asp.net-mvc asp.net asp.net-mvc-5 asp.net-identityasked 10 years, 5 months ago Renatto Machado 715 -
6
votes1
answer475
viewsWhat can cause the RU’s performance to fall in this scenario?
I’ve been making a data import for a project on ASP.NET MVC 5 with EF 6.1 and SQL Server 2008 where the import data source was a file txt. The record lines of the file were not very large but…
-
6
votes1
answer2742
viewsWorking with Currency (decimal)
I’m working on a project where I had the need to use decimal for field Currency. As the American standard and different from the Brazilian soon had some difficulties. I found some examples of how to…
-
6
votes3
answers1799
viewsWhat a difference between Dropdownlistfor and Dropdownlist
What a difference between Dropdownlistfor and Dropdownlist? And when and which to use?
-
6
votes2
answers786
viewsModal display when submitting a form
How do I display a modal when I submit a registration form? The content of this modal will be just a message. Here’s the thing, on this form, you send a file and some information. As it usually…
javascript jquery asp.net-mvc asp.net asp.net-mvc-5asked 9 years, 3 months ago Leomar de Souza 1,074 -
6
votes2
answers2858
viewsDifference between Viewresult and Actionresult
What’s the difference between Viewresult and Actionresult? I usually call a View using an Actionresult, but I’ve seen code with Viewresult. Then this doubt arose.
asp.net-mvc-5asked 8 years, 7 months ago Kelly Soares 1,181 -
6
votes2
answers3589
viewsEntity Framework 6 does not create database
I created a c# WEB MVC5 project in visual studio 2013, installed Entity framework 6 and created my classes("entities") as well as Dbcontext with the respective Dbsets. Inside the WEB.Config I set up…
asp.net-mvc-5 entity-framework entity-framework-6 ormasked 9 years, 12 months ago Cleiton Ribeiro 757 -
6
votes1
answer843
viewsDataannotations for checking between Start Time and End Time
I have two fields of type [Datatype(Datatype.Time)], being Start Date and End Date, and I cannot let the user enter the End Date less than the Start Date for the purpose of calculating hours worked.…
-
6
votes2
answers3494
viewsASP NET MVC Include Url Parameter on all pages
I have an ASP NET MVC application that is multi-client and multi-user, IE, it is prepared to be used by multiple customers and each client can have multiple users. Initially the login form has the…
-
6
votes1
answer285
viewsWhat is "Helper" for in Asp.Net MVC?
Please explain to serve Helper on Asp.Net MVC. I see many examples that contain Helper. I have no idea what it is Helper. And how to create Helper ?…
asp.net-mvc-5asked 7 years, 6 months ago Matheus Miranda 5,375 -
6
votes1
answer1271
viewsRelationship Problem Many to Many in the Entity Framework
I have the following situation: To perform an authentication, I’m using the old method for a small application, for assigning levels (roles), as many examples are found all over the web. Use EF and…
-
6
votes1
answer813
viewsSelf Relationship in EF
I’m having the following problem creating two self relationships. When rotating the Update-Database The following error message appears: Unable to determine the main end of an Association between…
c# entity-framework asp.net-mvc-5 entity-framework-6 code-firstasked 8 years, 3 months ago Lucas Ost 319 -
6
votes2
answers1906
viewsConvert and save photo in BD
I am working on a project where I have to save some photos. So I am studying the best way to accomplish the task. I thought about saving in the database, because these photos will be accessed both…
sql-server asp.net-mvc-5 winforms image-processingasked 7 years, 6 months ago Thomas Erich Pimentel 3,059 -
6
votes2
answers1265
viewsMVC 5 Customer side validation
I’m having trouble validating dates and numbers on the client side using MVC 5 Asp.net. Examples and tutorials I find on the internet are all outdated. I made the modifications according to this…
-
6
votes2
answers1675
viewsTranslating Identity in English
I’m using the Identity on my application MVC 5.2.3 Microsoft.AspNet.Identity.Core 2.2.1 also installed the translation package of the same Microsoft.AspNet.Identity.Core.pt-br 2.2.1…
-
5
votes3
answers2713
viewsASP.NET MVC5 - Asynchronous Methods in Controller
I’m developing an MVC layer for an ASP.NET system written initially in Webforms. It does not use Entityframework, so a good part of the system I had to elaborate a home solution. In order to use the…