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
-
5
votes4
answers3446
viewsJavascript function for zeros on the left with MVC 5
I have a loop inside my cshtml file. This loop has a variable i and I use it to compose a name according to her position in the loop, like txtNome1, txtNome2, txtNome3 and so on. I need to make the…
-
5
votes1
answer2001
viewsHow to List Users with Asp.Net MVC 5
I am using Visual Studio 2013, I am creating a new Asp.NET Web Application project using MVC and authentication by "Individual User Account". I would like to know how to list all registered users.…
-
5
votes1
answer275
viewsChange banner every page refresh
I have a list of 3 Banners. I must always show each one different Refresh of Page, even after closing the browser. I’m thinking about doing a fingerprint counter every time a Banner and shown adds +…
-
5
votes3
answers2113
viewsApplication that does not need to load full page
How can I create an MVC C# with Razor, where I have a Layout and then just update the central content and not the page as a whole. I read some places to use AJAX another to use PartialView. But what…
-
5
votes1
answer241
viewsLock files in Asp.net mvc folder
I have a folder named "app" I want to block access to all files if the user is not logged in. tried so: <location path="app"> <system.web> <authorization> <deny users="?"/>…
asp.net-mvc-5asked 10 years, 3 months ago Rod 9,412 -
5
votes1
answer496
viewsChanges to the database with Asp.net MVC 5
I am starting some independent projects using Asp.net MVC 5 with Entity Framework, and more learning from the technology. And at the moment a great doubt arose. I used the code generated through a…
-
5
votes2
answers999
viewsBundle does not render css Asp.net mvc
I’ve got my own bill @Styles.Render("~/Content/css") And it just stopped working, it yields nothing The Bundle is being registered in the global.asax…
asp.net-mvc-5asked 10 years, 2 months ago Rod 9,412 -
5
votes2
answers544
viewsProgress bar on file upload and information registration
I’m developing a project, where I upload files, as well as a record of information. Both the file and the information are registered in the same form. So far so good, but usually, when there are…
jquery asp.net-mvc asp.net asp.net-mvc-5 asp.net-mvc-4asked 9 years, 4 months ago Leomar de Souza 1,074 -
5
votes4
answers5763
viewsCapture Real User IP
How do I capture the actual Public IP/IP of the user accessing the application? The IP address of the computer I can capture normally, but I want to know the public IP address of this client.
asp.net-mvc asp.net asp.net-mvc-5 asp.net-mvc-4 asp.net-identityasked 9 years, 2 months ago Leomar de Souza 1,074 -
5
votes3
answers1861
viewsC# MVC Run Function (Logout) When Closing Browser
I am in a service system and need a help to understand how I can call some event (Javascript / jQuery / Or not) at the time a user closes the browser without logging "correct" by the system... Att.…
-
5
votes3
answers6557
viewsGet logged in user
In my project I have an authentication module and logout. But I wanted when the user logged in I’d get the id of it so that I would show the information concerning the login of it. Like a view…
-
5
votes1
answer795
viewsGood practice with . NET MVC
I have an ASP.NET MVC application and would like to know what good practices microsoft indicates in the organizational aspect of the solution, using the latest technologies such as ASP.NET Identity.…
-
5
votes3
answers4561
viewsValidate Datetime on the client
I have a model with a property like DateTime: [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:dd/MM/yyyy}")] [DataType(DataType.Date, ErrorMessage="Data em formato inválido")]…
-
5
votes2
answers15150
viewsError login facebook
When I try to log in facebook through my application, gives the error: Blocked URL: Redirect failed because the Url used is not in the release list in the client’s Oauth settings application. Check…
-
5
votes2
answers739
viewsMVC Custom and Friendly Routes | Create a Route with only one parameter in the URL
To create a path where only the single parameter would be displayed? For example, my route is currently like this: routes.MapRoute( name: "RouteEvent", url: "{ProdutoNome}", defaults: new {…
-
5
votes2
answers305
viewsOnly constructors without parameters and initializers are supported in LINQ to Entities - Asp.Net MVC
I’m developing an application that manages courses. The student, when entering the registration screen and clicking on the "registration" button, is associated to a course, that is, is enrolled. So…
-
5
votes2
answers398
viewsGlyphicons with error when publishing to IIS
I’m developing an application with Asp.net-mvc-5 and Bootsrap 3.3.5. In the visual studio, it works perfectly. However, when publishing the application in IIS 8, the bootstrap-glyphicons appear with…
-
5
votes2
answers585
viewsHow to change Checkbox with Dropdownlist onChange in ASP.NET MVC Table?
I am developing a site with ASP.NET MVC and Razor, I have in one of my pages a table with some columns. I have in this table a State column whose has a Checkbox and another column containing a…
-
5
votes2
answers474
viewsValidation without "Modelstate.isValid"
I have the following scenario: [HttpPost] public PartialViewResult Create(string dados) { var clienteViewModel = DeserializeJson<ClienteViewModel>(dados); if (ModelState.IsValid) { } // Não…
-
5
votes1
answer311
viewsIndividual User Account between MVC and Webapi projects
I have a MVC project with Individual User Accounts, I use Roles for access management and everything works well. Recently I had the need to create a file manager on another server, I created a WEB…
-
4
votes1
answer4398
viewsHow to configure Context not to put table name in plural?
I am in an ASP.net MVC 5 application, configuring a class DbContext. When the EF generates the database, the tables referring to the application objects are getting names in the plural. For example:…
-
4
votes1
answer1871
viewsI am unable to make the value of a property selected using the Razor Helper Dropdownlistfor
Dear Ones, in my ASP.NET MVC 5 application I am using . Net 4.5 I am unable to make the option to be selected for a certain property. Example of my class: public class Funcionario {…
-
4
votes1
answer1034
viewsUpdate edmx from the bank
I did an update model from database on my edmx. Well, the field I had added in the table appears in the diagram, but in the entity’s Cs, it continues with the old fields. What do I do, add in hand?…
-
4
votes1
answer1766
viewsMount URL without the Action or Controller name or both
Who has experience in and-Commerce, you know what I’m going to ask. Normally, when we create a route, and we call our Action related to that route, the URL is mounted like this:…
asp.net-mvc-5asked 10 years, 8 months ago pnet 14,727 -
4
votes1
answer275
viewsHow to add new properties to a user using Identity?
How can I create new properties using the Useridentity that comes by default when creating an MVC 5 application? Also, it is interesting to put information that does not belong directly to…
-
4
votes1
answer1387
viewsLogin screen with Membership and mvc5
How do I login using Membership and mvc 5? By the way, how do I use Membership?
-
4
votes1
answer121
viewsPerformance to Render ASP.NET MVC Pages
How can I have greater performance to render my pages using ASP.NET MVC ?
-
4
votes1
answer188
viewsPartial does not render
I have a problem with my application. What happens is that I am not able to render a partial in another view. Here the partial code: @model CEF01.Models.Ocorrencia @using…
-
4
votes2
answers1514
viewsView Razor to PDF
I need to convert Views of my MVC 5 application to C# using Razor to PDF. I already searched, and the free tools depend on iTextSharp, which I searched for has a different marking. But I need to…
-
4
votes3
answers1517
viewsHow to use Skip and Take with Pagedlist Helper
I would like to make the pagination, but using Skip and Take on my LINQ not to fetch all results. Currently my code is like this: public ViewResult Index(int? page) { var grupos= from s in db.grupos…
-
4
votes3
answers1099
viewscatching Description with Enumdropdownlistfor Asp.net mvc5
How I get Description using the html helper Enumdropdownlistfor from Asp.net MVC 5 ? I have my enumerator public num Dias { [Description("Segunda dia de trabalho")] Segunda = 1,…
asp.net-mvc-5asked 10 years, 2 months ago Rod 9,412 -
4
votes1
answer1289
viewsCustomizing Asp.net Identity - Multiple classes as User in Identity
We know that our user on Asp.net Identity is the class named after ApplicationUser I would like to create other classes that inherit from her Why? Why, say I have the Customer, Seller, User class. I…
-
4
votes1
answer1173
viewsLogin with different profiles
I’m developing an app for a school, where you take control of the students she has. The application makes the registration of students and registration of occurrences (suspension or warning) that…
asp.net-mvc database asp.net-mvc-5 visual-studio-2013 authenticationasked 10 years, 6 months ago Érik Thiago 2,338 -
4
votes2
answers462
viewsHow to use HTML5 data- attributes with Asp.net MVC?
How to use attributes with " - " from Html5 and other plugins with the Html helper from Asp.net mvc?
asp.net-mvc-5asked 10 years, 2 months ago Rod 9,412 -
4
votes1
answer204
viewsHow to make editable template in ASP.Net MVC?
I see in many systems, (e-commerce mainly) the possibility of editing the system template by changing the CSS and HTML documents. There is some engine or similar in Asp.net MVC? These codes (CSS,…
asp.net-mvc-5asked 10 years, 1 month ago Rod 9,412 -
4
votes1
answer1435
viewsWhat encryption is used by Asp.net Identity?
When we create a user using Asp.net Identity, it generates a Hash, even there is a column in the database named Passwordhash My question is, what kind of Hash is generated ? What encryption does…
-
4
votes1
answer147
viewsHow to show the build version?
I see in some pages and systems the compilation version. I’d like to show in a view the compilation version of my ASP.NET MVC project.
-
4
votes1
answer1395
viewsController message to view
I did that: [HttpPost] public void CadastraUsusario(string _nome, string _usuario, string _email, string _nivel_acesso, bool _ativo) { using (RupturaEntities db = new RupturaEntities()) { Usuario…
-
4
votes1
answer2409
viewsMany to many relationship with Asp.net MVC and Entity Framework
I’m creating a project to study Asp.net MVC 5 along with Entity Framework 6, and I came across a great doubt in a many to many relationship. I used the model generated from the database, and created…
asp.net-mvc-5asked 10 years, 2 months ago Erico Souza 2,188 -
4
votes2
answers879
viewsCreate a routine within an Asp net application in c#
I have to run a method on my project ASP.Net, made a screen for me to select a Excel and a method for handling and insertions in the bank, only that this method will have to be run daily, someone…
-
4
votes4
answers14354
viewsLine break in bootstrap
I’m making a form, and I have the following code: <div class="row"> <div class="col-md-6"> @Html.EditorFor(model => model.Nome) </div> <div class="col-md-6">…
-
4
votes1
answer81
viewsController and action routes in lower case
How to make the routes of controllers and actions are all in lower case? For example: instead of Noticias/Details stick around noticias/details.…
-
4
votes1
answer357
viewsHow to force login after running the application?
My scenario is this:: After authentication with Active Directory, the user who logged in is saved to a Session [HttpPost] public ActionResult Login(LoginModel model, string returnUrl) { if…
-
4
votes2
answers83
viewsPersistence using Fluent API
How do I persist an address without having to pass on all customer information? Below is my address client mapping: HasMany(f => f.EnderecoList) .WithMany(e => e.ClienteList) .Map(me => {…
-
4
votes2
answers717
viewsNormalization of tables and relationships
I’m starting a project from scratch and in the middle of bank modeling, I had a problem. While building the models, I couldn’t do it the right way and I ended up getting confused. I have student…
-
4
votes0
answers377
viewsSignair - C# - Real-Time Response
I’m using C#, Asp . Net, SQL Server. I have the following question, I am creating a web and mobile application to communicate with a Webapi but I came across the problem of information and/ or data…
-
4
votes2
answers216
viewsView Model should have related classes?
I have three entities: Manager, PersonalData and Address. A Manager has a PersonalData and a PersonalData has a Address. My doubt lies in the time to create the Viewmodels, I would have to have…
-
4
votes1
answer892
viewsAjax request
I am loading the menu, from the system I am developing, through a request via ajax using jQuery, but the formatting of the menu is not as expected. My request via jQuery <script…
-
4
votes3
answers10666
viewsError in publishing application to OSI
I am publishing an application on IIS, and when accessing it I get the following error: HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the configuration data…
-
4
votes1
answer647
viewsProblems authenticating to Report Service 2014 server via C# MVC5 application
I’m having a problem connecting to the Report Service 2014 server via C# of an MVC4 project: Setting: A Server Report Service 2014 has been installed that will have numerous reports, due to the…