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
votes3
answers3523
viewsASP.MVC error "cannot find resource"
I’m starting in ASP.NET and tried to create a test app. When running by Visual Studio I have the print error. I created a standard MVC 5 project, created the controller the model and the view each…
asp.net-mvc-5asked 7 years, 6 months ago Ronaldo Lopes 453 -
1
votes1
answer385
viewsExternal form filter with jquery datatables
I am trying to make an external filter from an external form Until then, for a simple generic search, jquery datatables use the parameter 'sSearch' For that, I just do var grid = new…
asp.net-mvc-5asked 9 years, 7 months ago Rod 9,412 -
1
votes1
answer553
viewsHow to call the same Actionresult more than 1 time to refresh the page?
I need to call Actionresult each time I select a new record in the Dropdownlist calling only 1 time when loading the page. No Controller private string PegarCaminhoImagem(Int16 controle) {…
-
1
votes1
answer167
viewsError Running a query with npgsql + Dapper in postgresql
I can capture my "user" object that has inside of itself a "Login and a Password" and, when executing the function by my ORM, I catch the following error message: {"42883: operator does not exist:…
-
1
votes1
answer497
viewsCommunication between MVC Controllers
I’m having trouble making a communication between Controllers each in a Area different, the public methods of the second controller are not available in the first. Is there any way to do this?…
-
1
votes2
answers691
viewsPopular Dropdownlist with JSON
-- Controller -- [WebMethod] public ActionResult GetSellers() { List<Seller> sellers = db.Sellers.ToList(); return Json(sellers, JsonRequestBehavior.AllowGet); } -- View --…
-
1
votes1
answer139
viewsHow to link an Id to Asp.net MVC
Guys, I have a little problem with my application, which is a course manager. The problem is that "student" has to enroll in some course, only I’m not able to make the student’s association to the…
-
1
votes1
answer318
viewsHow to pick up the percentage of Postgre database storage space via EF Core in Asp.net Core
I need to create in my application a feature that checks in the database (PostGreSQL) the percentage of storage space used to be shown in a graph. I have a generic repository, and I thought I’d…
asp.net entity-framework postgresql asp.net-mvc-5 postgresql-administrationasked 6 years, 8 months ago Master JR 1,853 -
1
votes1
answer1406
viewsDisable a button on Asp.net MVC
I am developing an application that manages enrollment in courses, I am still an apprentice at Asp.net MVC, and I have the following question: On my course screen is a "registration" button for the…
-
1
votes0
answers193
viewsHow to change the length of an input in Asp.net MVC
Hello, I’m having a hard time changing the width(length) of an input in asp.net MVC, I followed the course guidelines and it didn’t work. follows the code of my view, if anyone can help.... I can’t…
-
1
votes1
answer359
viewsListing on Asp.Net MVC
Guys, I’m developing an application that manages enrolment courses, on my screen of listing the courses is like this: Only I need to make a new screen with another type of listing, and I would like…
-
1
votes1
answer500
viewsView does not render on Asp.net MVC
Guys, I’m a beginner in asp.net MVC and I’m already picking up a certain amount of time for a blessed View. According to the help I had in this post Button only works if you pass the ID in the URL…
-
1
votes1
answer525
viewsButton making Submit for action instead of opening only Modal
I am riding a Modal to add a category and a list of products in a modal. When I click the button to add a new product my category Create action is called when I should just open the modal. I do not…
-
1
votes1
answer80
viewsProblems with Entada mask removal in Partialviews - Asp.Net Core
I’m having trouble with input masks (bootstrap) on all screens. I found the following interesting: All my Views that are returned in the form of "Partialview", the input masks do not work. For…
-
1
votes1
answer221
viewsHow to migrate a C# system using ASP.NET?
Good morning! I’m new to the programming environment and I’m developing a C# system using Windows Forms. In the future I intend to make this same system in ASP.NET. I wonder if there is any way to…
-
1
votes1
answer40
viewsHow to remove /home/ from a View URL specifies ASP.NET MVC5
I need to create a View called BancoDeImagens but I need her URL instead of being: www.site.com/home/Bancodeimages I would like to remove the /home/ and separate the names by - to keep it that way:…
-
1
votes0
answers221
viewsError - Only primitive enumeration types or types are supported in this context in Asp.Net MVC
As explained in this link Only constructors without parameters and initializers are supported in LINQ to Entities return View(db.Cursos.ToList().Select(c => new CursoInscricoes(c,…
-
1
votes2
answers88
viewsRename error message
Follows model: [DisplayName("Data:")] [ValueParser("ptdateparser")] [AssertThat("DeadLine > Today()", ErrorMessage = "* Data deverá ser superior a data de hoje")]…
-
1
votes1
answer363
viewsHow to add fields dynamically and link them to viewmodel in Asp.Net
I have a 1:N relationship between Person and Contact. In my view, I can list all the contacts of a customer when it is opened. I need to implement the "New Contact" button so that when clicked,…
javascript asp.net-mvc asp.net asp.net-mvc-5 asp.net-coreasked 6 years, 2 months ago Master JR 1,853 -
1
votes0
answers57
viewsQuery using Object with Entity Framework
I have a method that gets one object which may be both int as string, someone knows a way to do the entity framework interpret the Object!? I know I can make one if and do the verification, but I’m…
-
1
votes1
answer1626
viewsC# decimal field in the form
Simple question: I have a currency decimal field on my model. It happens that when I insert a decimal value in the form field, it arrives as integer in the Controller: Example: Value of KM Wheelset:…
-
1
votes0
answers200
viewsPagination problem X.Pagedlist
I am trying to implement X.Pagedlist pagination, but on this line: @Html.PagedListPager(Model, pagina => Url.Action( "Index", new { pagina, search = ViewBag.Busca })) I’m getting the following…
-
1
votes2
answers147
viewsProblem with a Count in Asp.Net MVC
My application manages courses, on my registration screen I have a field "amounts of vacancies", where, this is decreasing every time a student enrolls in a course. The problem now is that my Count…
-
1
votes1
answer97
viewsJWT and Identity MVC 5
Salve galera, I’m looking for how to use both (JWT with Identity MVC 5), but I can’t find anything about it, I just found it for Identity . Net Core 2, this is not good for me because the…
-
1
votes1
answer287
viewsHow to edit a Boolean field in a list in Asp.Net MVC
Guys, I’m developing an application that manages Courses, and I have the following problem. On my screen Administrator I need the fields Course Name, Student Name and the countryside Approved which…
-
1
votes1
answer115
viewsHow to change the list type in Asp.Net MVC
How do I change this kind of listing For this type of list below My View @model IEnumerable<MeuProjeto.Models.AlunoCurso> @{ Layout = "/Views/Shared/_Layout.cshtml"; } <h2>Aprovar…
-
1
votes1
answer584
viewsHow to delete multiple selected records in a Datatable Bootstrap using Javascript - Asp.net
In my Index I have a Table (Datatable Bootstrap) that allows me to select as many Rows as desired. The datatable lines are loaded dynamically using JS. Each Line stores the Registry Id:…
-
1
votes1
answer616
viewsHow to list items per logged-in user in Asp.net MVC
I have an application that manages Courses and I have the following problem, the pupil makes his enrollment in courses, only when the pupil access the page where lists the courses he is enrolled,…
-
1
votes3
answers494
viewsProblem with a Boolean field on Asp.net MVC
My application that manages Courses has an area of Administrator where he approves a pupil in a course. That one field that Approves a student is a field booleano, I’m just having trouble with this…
-
1
votes1
answer96
viewsAsp.Net MVC Enable breakpoint instruction Javascript
When running the system it does not respect breakpoint and displays this message as shown in the image. According to this microsoft documentation should work like this.…
-
1
votes2
answers101
viewsProblems filling out PDF fields in Asp.net MVC
I’m in trouble to render some fields from my table in the file PDF. It was working fine, but I don’t know what happened to those fields are no longer rendering. On my screen My Courses, the pupil…
-
1
votes1
answer1018
viewsError "Access-Control-Allow-Origin header is present on the requested Resource"
I need to insert an API on my site that brings the weather forecast for a certain city, however, the request ajax always returns the error in the browser console. Below: XMLHttpRequest cannot load…
-
1
votes2
answers772
viewsRegister only some data from a C# Asp.net MVC 5 form
I have a person registration form, where I also already register her address, there arose the need to be able to register more than one address for the same person at the time I am registering her,…
-
1
votes1
answer282
viewsTempdata works on Localhost but doesn’t work when published
Thank you in advance for your attention! I am developing in ASP.NET MVC5 What happens is this: when the tests are carried out in the localhost, this code works perfectly. I can retrieve the tempdata…
-
1
votes1
answer571
viewsAsp.NET MVC checkbox list bind with string value
I have a checkbox list and need to bind values that are strings (@item.Selectedvalue) with my Ienumerable>. <div class="editor-field perfil-filtro-expander-todasAcoes"> <div class="metro…
-
1
votes1
answer142
viewsController search structure mvc 5
I have a normal application in mvc 5 and would like to change the basic folder convention for controllers/views. For example: /Controllers/Admin/Controller1.Cs /Controllers/Admin/Controller2.Cs and…
-
1
votes2
answers2209
viewsGet the client id from a selected Datatable line
How to Get a Customer Id from a DataTable This column is hidden ? When I click on the line DataTable I will need this ID to display in another View with Customer details. I have the following code…
asp.net-mvc-5asked 9 years, 2 months ago hard123 2,329 -
1
votes1
answer275
viewsJsonresult return error
I’m having a hard time understanding this problem: When I click on the line Datatable to edit the Customer data error occurs whenever the Customer has a Contact or a registered Address and this is…
-
1
votes2
answers296
viewsvalidation for Partialview
I have a page that calls a partialview formed by a div with text field inside it, through a button. Each time the button is pressed a line is added. The problem is that I cannot validate the empty…
-
1
votes2
answers673
viewsHow to return to the previous page by Handleerrorattribute?
I am trying to implement a global filter for error handling and started testing as follows: public class MyHandleErrorAttribute : HandleErrorAttribute { public override void…
-
1
votes2
answers1501
viewsDropdown Menu ASP.NET MVC 5
I need to change the menu to apply a Dropdownlist, but I’m having difficulty. I’m following the footsteps of the bootstrap site, but when click does not appear the submenu, follow the code below:…
-
1
votes0
answers265
viewsAdding Partial Views to my main page via a modal
I own a page with a button that calls a modal and in this modal there is a table with the products, that when I click on a record of the products it is added on my page. Adding only the first…
-
1
votes1
answer12835
viewsShow "Wait..." message while the page loads in full - MVC jQuery
I have a view who carries a Datatable.Net, where I need to display a popup with the message "Aguarde...". Popup opens when the page is loaded, but how do I close it? The way I did, Popup doesn’t…
-
1
votes2
answers306
views<httpErrors> does not work
I’m trying to make a mistake handling with this setting: <system.webServer> <modules> <remove name="FormsAuthentication"/> </modules> <httpErrors errorMode="Custom"…
-
1
votes1
answer311
views:before does not work as it should
I bought a CSS and am trying to apply on my site, the Cass I bought has a validation scheme in the form where it circles the form with a red line and puts an X inside the text box. I’ll put an image…
-
1
votes1
answer65
viewsHow to put a form in the _Layout view?
I’m trying to make a website with support for two languages. First test I did was to put this code inside a view common, the index of my control Home. Worked perfectly. When I put the same code in a…
-
1
votes1
answer52
viewsHow to avoid controller duplication/accountability in modern applications?
Nowadays, communication between applications, mobile and/or other devices is increasing. The . net provides the Asp.net MVC and Asp.net WebAPI (to date today, stable version). Commonly the Asp.net…
-
1
votes3
answers2001
viewsError trying to send email
I am trying to send emails (using my Hotmail account) and am encountering the error below: A connection attempt failed because the connected component does not replied r ncorretamente after a period…
-
1
votes2
answers1205
views@Html.Actionlink and Url.Action are not taking the route of the controller annotation
I have the following method in control: [Route("video/categoria/{categoria}/{page?}/{sort?}")] public async Task<ActionResult> Index(string categoria, int? page, string sort) { ... } My…
-
1
votes0
answers1006
viewsError reading byte array passed as parameter
That is the mistake: The input is not a valid Base 64 character string, as contains a character that is not base 64, more than two characters from or an illegal character between the characters of…