Most voted "asp.net-mvc" questions
ASP.NET MVC is an open-source Microsoft framework that implements the Model View Controller architecture standards for web development. Based on ASP.NET, it allows software developers to build web applications following the Model View Controller architecture standards, featuring a variety of features following recent trends.
Learn more…3,385 questions
Sort by count of
-
54
votes4
answers17728
viewsWhat is a scaffold?
I started studying ASP.NET MVC and came across the term scaffold, but I didn’t understand it very well, so: What is scaffold? What is its use within ASP.NET MVC?…
asp.net-mvc .net terminology software-engineering scaffoldasked 8 years, 9 months ago Marco Souza 12,304 -
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…
-
28
votes2
answers12475
viewsWhat is the Antiforgerytoken?
What is the AntiForgeryToken and what it serves as in an ASP.NET MVC application?
-
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…
-
21
votes5
answers6769
viewsShould I use GUID or int as the primary key?
I’m about to start a new project in MVC 4 with Entity Framework, searching I found several examples here in Sopt of models that use GUID as ID and some doubts have arisen me: What is the advantage…
-
21
votes2
answers1634
viewsWhat is ASP.NET vNext? What is the correct name?
Okay, I know that ASP.NET vNext is the new version of ASP.NET being released by Microsoft in 2015 and that brings big changes changing the way of working various things. This vNext name was used as…
asp.net-mvc asp.net asp.net-web-api asp.net-core nomenclatureasked 9 years, 9 months ago Maniero 444,682 -
18
votes3
answers1166
viewsWrite Timespan in full
I want to write a static class (can be Extension) to represent the value of a structure TimeSpan in full, in Portuguese. The idea is to always compare the current date (Datetime.Now) with the date…
-
17
votes2
answers9076
viewsMVC Asp.net paging
Currently I work with the data like this: Context returns to me all Bank Customers public IEnumerable<Clientes> ListarTodos() { return contexto.Clientes.ToList(); } In the controller I call…
-
17
votes2
answers1493
viewsWhat can I do in . NET Framework and . NET Core not? And vice versa
I grew my eye on . NET Core (ASP.NET Core), I started with C#, but I left it by going sideways "open-source", now with this opportunity I decided to "return". I intend to use . NET Core (ASP.NET…
-
16
votes1
answer1856
viewsASP.NET MVC - Attribute you write in a View
I need to write a Attribute write a mask validation in the View. Given for example a zip code field, I would like it to mark a Property in the Model with a [CEP], be written in View the following:…
-
16
votes1
answer1184
viewsBest Practices for Insertion, Modification and Deletion with Entityframework
For deletion of records you may not have, but for Insertion and Change I believe there should already be something discussed. Probably the best practice on Insertion and Amendment is Viewmodel s,…
-
16
votes3
answers3624
viewsWhen to use asynchronous or synchronous method?
When to use asynchronous or synchronous methods in controllers (index, search, delete, create) of ASP.NET MVC applications? Can I lose performance? In which situations should I use one or the other,…
c# asp.net-mvc .net entity-framework asynchronousasked 7 years, 7 months ago George Wurthmann 4,415 -
15
votes2
answers2432
viewsHow to create a Date list with a specific day
I am working on ASP with MVC 4, and I hold create a list of dates from the data entered by the user. For example, the user inserts the day of the month in which a certain occurrence will be made. It…
-
15
votes3
answers15338
viewsHow to validate CPF with Dataannotation on Client and Server?
I need to validate CPF with Data Annotation, and check for duplicity.
-
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, 9 months ago user3628 -
14
votes1
answer485
viewsHow to do Signalr load test?
When testing with the library SignalR to create applications in real time in . NET, generated some doubts about scalability which could not be found on the internet. After a few tests using the…
-
14
votes4
answers9242
viewsDatetime field error message
I have a field in my application in mvc Asp.net c# to put start date and end date. [Required(ErrorMessage = "A data de início é obrigatória")] [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}",…
-
14
votes2
answers11938
viewsGet national holidays
I am making an application and would like to know if there is any way to get the national holidays. For example: Some Google Calendar API where I can get some XML to consume..
-
14
votes1
answer11725
viewsCLSID component COM class factory recovery failure
I have developed an application on my pc that does the following: from an upload of a word document, it generates a new document with some basic information. To generate this information, it opens…
-
14
votes3
answers2118
viewsMemorystream vs Stream
What would be the main difference between the two? There are advantages to performance gain? For web use, which is the most appropriate? I’m using to "read" a array Byte[]: private void…
-
13
votes4
answers6431
viewsHow does the interaction between the layers in C# work and what is the function of each one?
Assuming a project with these layers: DAL, Controller, Negocio, Model and View I’m trying to learn C# seeing ready-made project codes, but not quite understood yet the correct order of creation and…
-
13
votes2
answers1340
viewsWhat good is a Viewmodel in ASP.NET MVC?
I’m used to the MVC approach of frameworks as Cakephp and Laravel. Now that I’m getting deeper into ASP.NET MVC, I’d like to understand what this Viewmodel is for. What is the purpose of the…
-
12
votes1
answer1432
viewsAsp.net MVC adding application name to URL
I have a domain on a shared server and within it I have some subfolders that are set as applications on IIS 7. Within the main domain I created subdomains that redirect to applications/folders. Ex:…
-
12
votes1
answer680
viewsCode First versus Database First?
I’m used to creating projects on Asp.net-MVC with Entity Framework Database First. From a modeling, the database and the system are created. However, I see a lot of programmers prefer Code First,…
asp.net-mvc entity-framework code-first database-firstasked 10 years, 1 month ago Andre Figueiredo 5,030 -
12
votes1
answer633
viewsDesign Pattern
Good use the following design pattern: Where the Interface will communicate only with the application and this will communicate with the Repository. Thus the interface will have no restrictions and…
asp.net-mvc software-architecture software-engineeringasked 10 years, 3 months ago Diego Zanardo 3,301 -
12
votes1
answer480
viewsPassing parameters with Asp.Net MVC
In asp.Net MVC. What’s the difference between using ViewBag, ViewData e View Tipada? And when we should use them, there is some specific situation? There is a difference in performance between them?…
-
12
votes1
answer6870
viewsDate problem with globalize.js and jquery.validation.globalize.js. How to resolve?
I’m having problems with the date fields of my application. Follow this answer that seemed more appropriate, Datetime field error message, I configured my ASP.NET MVC application as follows: I…
-
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:…
-
12
votes2
answers785
viewsSelectize.js with Tags, reload key and value in edit form
I posted the same question in the Gringo OS too. I’m making a research form (action=GET) where a field uses Selectize.js: $("#selectize").each(function () { $(this).selectize({ plugins:…
-
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…
-
11
votes3
answers1063
viewsWhat is the difference between System.Web.Http and System.Web.Mvc?
I have an MVC project and in it I will have normal controls and controls providing services via webservices (Controller and ApiController). And I don’t know which one to use because I don’t know…
-
11
votes2
answers1625
viewsLambda Groupby by year and month
I have a list of events, and I’d like to group them by year and month, for example [Year 2017] Month January { Event 1, Event 2, Event 2 } Month February { Event 3 } [Year 2018] Month January {…
-
11
votes3
answers17994
viewsWhat is the Difference Between HTML.Actionlink vs Url.Action?
Reading some tutorials of ASP.NET MVC I found these two helpers being used to do basically the same thing, which was to direct the user to a new view. So I wonder if there’s any more remarkable…
-
11
votes2
answers701
viewsSave and send selected item id in dropdowlinst
I’m trying to do a search, filtering through a dropdowlist. In short, I select a level of instruction in a list and when I click 'Search' I want to return to the list of people who have that level…
-
11
votes1
answer332
viewsHow to know if path exists?
One of the classes of my system is created with the information of a file. When starting the system, it initially runs the following lines: public List<Estabelecimento>…
-
11
votes4
answers3477
viewsPress button with keyboard enter key
I have a record button on my site, I would like to press the "Enter" key on the keyboard this button is triggered, as if it were a mouse click, there is some function to do this? Button code:…
-
10
votes3
answers7413
viewsHow to customize error pages on an ASP.NET MVC system?
How to display a friendlier page when an error occurs in my Asp.net mvc application (not that yellow page)?
-
10
votes4
answers16962
viewsWhat do you call a "Stored Procedure"?
How to call a procedure in ASP.NET C#? Follow my simple procedure: CREATE PROCEDURE GetAdmin ( @email VARCHAR(50), @password VARCHAR (50) ) AS BEGIN SET NOCOUNT ON; SELECT * FROM Admin WHERE Email =…
-
10
votes2
answers7394
viewsEntity Framework update and delete associative entity
I have a student table that has many to many relationship with the course table. Thus resulting in the table CursoAluno. I would like to know the correct way to the update and the delete table…
-
10
votes3
answers5558
viewsMaster-detail in MVC C# with Razor
Guys I need to set up a master-detail record. I have already researched and seen some examples on the internet, but as I do for when the master is not registered, the details are stored temporarily…
-
10
votes1
answer4542
views3 layers vs MVC
3 layers: DAL (Where the classes (model) and bank operations are located BLL (Where the business rule is) Presentation (Usually the WEB) An example: DAL public class AlunoBanco { public void…
-
10
votes2
answers5369
viewsCommunication with Pagseguro
I need to make an application to communicate with the pagseguro. That is he makes the purchase, I send and then I need to automatically update in the bank when you make the payment. Until sending to…
asp.net-mvcasked 10 years, 2 months ago Felipe 327 -
10
votes3
answers6925
viewsHow to send 2 Controller objects to the View in C#?
I made a query in the database in 2 tables and saved in 2 objects in the controller, but I can only send 1 object to the view. // Controller // Pego os dados do BD e salvo no objeto var objPessoa =…
-
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
answers1283
viewsRemove Saturdays and Sundays from Calculation
I have a project where I work with activities of a project, my activities have a certain time to be completed, but the project has to make the calculation only with administrative days. For example…
-
10
votes2
answers433
viewsKeep data between sessions
I have an ASP.Netet MVC project where I file a report that requires quite resource of the machine in question of processing. I have a Action that generates and another that returns the report data…
-
9
votes2
answers1921
viewsAsync operations on ASP.NET
When it is advantageous to use asynchronous operations in an application ASP.NET (classic, MVC, MVC Web API)? When do I use the ThreadPool to perform some operations may be useful?…
-
9
votes2
answers6651
viewsImage Upload
I am trying to upload images to my application. I have made a prototype upload, but it does not show the image, but its ID or NAME. And I’m uploading it to a folder I created in my project. My…
-
9
votes4
answers1270
viewsHow to notify Web Api user with Signalr?
Upon receiving a post in an application Web Api need to notify a particular customer that a new record has been entered. This user will see this notification in a client application(javascript)…