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
-
0
votes1
answer89
viewsSort and sort a string
Then with the sequence sorted and ordered crescently need to exclude all characters that come after (and including) the symbol "_" (without quotation marks). Could you help me where I should start ?…
-
0
votes0
answers23
viewsHow to keep the data entered in the View when we change page and return to it
I’m trying to make an application where the user on a page has multiple multiple choice questions, he marks the radio and changes page. If he returns to the page again, these options he has marked…
-
0
votes1
answer430
viewsError generating Controller MVC 5
Good morning colleagues, I am trying to generate a controller on MVC 5 with VS 2019 and am taking the following error message. Someone could help me with this problem? Error executing selected code…
-
0
votes0
answers62
viewsData Format (Dataannotations) does not work - Asp.net Core
I’m having problems with displaying a datetime format. I get the "03/12/1980 12:34:09", but only the input mask appears. How to make the date appear along with the time? Thank you :)…
-
0
votes1
answer198
viewsNuget Visualstudio Problem
I have a problem. Until yesterday it was not, everything was normal. Today when I went to activate a Migration, add or update, is giving this error in the console. Enable-Migrations : It is not…
-
0
votes1
answer2189
viewsHow to fix System.Collections.Generic.Ienumerable error
My application that manages Courses is making that mistake O item de modelo passado para o dicionário é do tipo 'System.Collections.Generic.List'1 [MeuProjeto.Models.Curso] ", mas este dicionário…
-
0
votes1
answer113
viewsWhat is the difference [email protected] vs 'Asp-controller' next to 'Asp-action'?
I am doing a project in ASP.NET MVC and I came up with this question, The Url.Action in a 'tag' (for example in a navbar) can redirect the page passing the method and controller as parameter.…
-
0
votes0
answers15
viewsDOT NET Application Build 4.6.1 MVC 5.2.3 with MSBUILD generates more files than needed
Build command generates more files than needed. In the Azure Appservice I have 234 files when the build generates 326. Have some other command like DOTNET PUBLISH to run later? Command used to…
-
0
votes0
answers579
viewsGet dynamically generated element id (Begincollectionitem)
I own a View, where I take the selected value in a DropDownList, I use this value in a query ajax and people another DropDownList with the return of the consultation. Until that part, all right.…
-
0
votes0
answers277
viewsForeign key Entity framework 6
Someone can help me make a connection between these two tables, I want to use the enrollment field to make that call, and enrollment in the student table is not the primary key. public class Aluno {…
-
0
votes0
answers253
viewsUsing Claims to replace Sessions
I am refactoring an application that I am developing, applying good practices in ASP.NET MVC, there arose a difficulty in understanding Claims and how to apply it to replace the Session use. When I…
c# asp.net-mvc-5 session authentication asp.net-identityasked 9 years, 2 months ago Anderson Souza 376 -
0
votes2
answers597
viewsError creating modal window with jQuery in ASP.NET MVC
I am trying to create a modal window with registration deletion confirmation and avoid having to create a View only to present a message, but something is not loading right. I tried to create the…
asp.net-mvc-5asked 9 years, 1 month ago Kelly Soares 1,181 -
0
votes1
answer141
viewsModal in the controller
I am working on a page that has an Order model and there is a button that when pressed opens a product modal, with a table with all products. As I click on a line a product is added to the…
-
0
votes0
answers148
viewsReload all css within a div
Gentlemen, I will try to explain my problem, I hope to be clear. I’m using C# MVC5 in my app. Today I have a page and in it a grid. In this grid there is a button to edit the record. By clicking…
-
0
votes2
answers77
viewsPOST in Ajax arrives with null data in the Actionresult of MVC5
I have an AJAX function that is the event click of a button where I pick up all the checkbox which are checked and caught the values of each and play on an array this way:…
-
0
votes0
answers149
viewsError loading cascading dropdownlist
I am trying to load a dropdownlist cities according to the selected state and am encountering an error. I managed to carry out the operation in a template I downloaded from the internet, but I’m not…
-
0
votes0
answers126
viewsInfinite Scroll in ASP.NET MVC and SEO
Guys, I need to make one Infinite scroll in ASP.NET MVC, but I need to separate the content on demand as suggested by the blog Webmaster Central Blog, so that the Google robot can index my products.…
-
0
votes1
answer39
viewsAction is not receiving the value of the parameter
In the code below I am trying to pass a parameter to an Action. The action is being called and the value of the parameter is also being assigned to Url. But Action takes Null, not the value of the…
-
0
votes1
answer338
viewsI can’t download a file by Actionlink mvc5
I know the error is in the way I am interpreting the routine. I have a routine to download a file attached to a table. This file was generated by my application (binary) and now I need to write this…
-
0
votes2
answers1053
viewsPut a datepicker in a mvc 5 view with jquery or similar
I have this Razor in my view: <div class="form-group"> @*@Html.LabelFor(model => model.DT_AGENDAMENTO, htmlAttributes: new { @class = "control-label col-md-2" })*@ @Html.Label("Data de…
-
0
votes2
answers319
viewsASP.NET MVC Bootstrap Access Control Edition
Good Morning! I have a project created and in it already contains an access control system that was created automatically when I created the project, I wonder if it would be possible to edit this…
asp.net-mvc-5asked 8 years, 11 months ago Vinicius VAz 521 -
0
votes3
answers780
viewsHow to send dynamically created fields via JSON?
How to send via JSON fields input dynamically created, for example: The user type in a text field number 4 and the function creates 8 input fields, or type 5 and the function creates 10 input…
-
0
votes1
answer203
viewsDifferentiate list of items shown in the View using "Individual User Account" Asp.Net MVC 5
I don’t have much practice in programming and am creating a system of registering items like movies, books, games, etc. for a college job. The problem is that I need to use a user manager system so…
-
0
votes1
answer106
viewsASP MVC 5 - Image Upload Error "The input is not a Valid Base-64 string"
I am trying to solve this error in all the ways I found suggested in forums, but all the solutions I tried none solved my problem. Whenever I perform a Ubmit my View shows this error and does not…
asp.net-mvc-5asked 8 years, 6 months ago Kelly Soares 1,181 -
0
votes1
answer40
viewsFiles . js are not loaded after Actionlink loads Partialview
I have a _Menuleft Partialview that contains my menu items, it is loaded in _Layout with the Html.Partial(") Helper. Inside the 'li' menu there is an Actionlink to click on the div "content" the…
-
0
votes0
answers247
viewsUpload - the process cannot access the file because it is being used by another process
I am trying to build a file manager, but I am finding a problem when updating the file. First I do the upload file, and after that, if the user wants to update, I have the option to update, where…
-
0
votes0
answers41
viewsProblem on application startup?
I have an application on Asp.net mvc 5 hosted on a dedicated server and in some moments when the Application Pool is unused and the IIS raises it on the first access I’m getting the following error:…
-
0
votes0
answers422
viewsUncaught Referenceerror: Function not defined, load via ajax in partial view with ASP.NET MVC
Let’s go to the stage: A view, which contains a form, is loaded via Ajax (load) into a modal (bootstrap) and then this modal is displayed. The form is built by the @Ajax.Beginform helper where is…
-
0
votes1
answer121
viewsException error when authenticating login with null values - Simplemembership - ASPNET MVC
I developed a project on Asp.net mvc5 of a course I’m doing, which is accusing the following error of exception when authenticating the login menu when I enter no data in the form fields and step…
-
0
votes2
answers518
viewsAjax always falls into 'error' even when successful (C# MVC5)
Come on. I have the following method: C# [HttpPost] [AllowAnonymous] public JsonResult PostOnCRM(string textBoxFirstName, string textBoxCountry, string textBoxLastName, string textBoxEmail, string…
-
0
votes0
answers47
viewsList data in a Dropdown related to the result of another Dropdown
I’m rephrasing that question, because it must not have been very clear. What I want is this: Choose a restaurant at Dropdown, and the next dropdown, list the times that were registered by that…
-
0
votes1
answer1598
viewsHow to use, install, free template for Bootstrap 3
I have a tremendous doubt about this type of Theme, I’m starting to mecher with ASP.NET MVC, so I came across this Bootstrap, so I started researching about free themes and we have several options…
-
0
votes1
answer544
viewsHow to reference an image <img> tag
I’m studying Asp.Net MVC and I’m having trouble defining the tag URL HTML: <!-- menu profile quick info --> <div class="profile"> <div class="profile_pic"> <img…
-
0
votes2
answers673
viewsHow to redirect if user is unauthorized
I am using in my application, roles and I am trying if, user is not authorized, is redirected to an error page. I’m using ASP.NET MVC com Identity, in research on the Internet and here at…
-
0
votes0
answers265
viewsError with Automapper
i have trouble mapping child classes in automapper, qndo do viewModel for model. Has anyone ever had that kind of problem? thank you very much I’ll post the classes public class…
-
0
votes1
answer854
viewsAsp.net MVC cshtml Divs layout alignment?
Good afternoon! Dear friends, I am a beginner in the area of development and I have a small doubt. I have an ASP.Net MVC 5 project, where I have a layout inserted in my master page in…
-
0
votes1
answer150
viewsConnection string for different logged in users
I am doing a job and I came up with a possibility that I would like to know if it is possible to realize: the purpose of this idea is to alternate a certain connection string as per the user logged…
-
0
votes0
answers321
viewsError IIS 7.5 loading CSS and JS files, Error 403.14 in directory.
I published an Asp.net mvc 5 project on a server with Windows Server 2008 R2 and IIS 7.5, when trying to run the application it does not load the css and js files. Where in my project the files are…
-
0
votes1
answer35
viewsJavascript event repeats itself in other Ids
I wanted to make a Javascript if repeated in other screen components, in this example I am passing I did a foreach and inside it I put my javascript. the intention is that it repeated itself 10…
-
0
votes1
answer335
viewsCreating a Dropdownlist
I’m using Asp.net-mvc-5, and wanted to know how to create a Dropdownlist without being in this pattern here: <div id="conteudoEscolha"> @Html.DropDownList("", null, htmlAttributes: new {…
-
0
votes1
answer468
viewsHow to insert an object and a list of objects in the same request
I have a supplier object, and each supplier has several contacts, on the page, has a tab for the supplier registration, and another tab for the registration of contacts, the contact registration tab…
asp.net-mvc-5asked 7 years, 12 months ago Alan Almeida 633 -
0
votes1
answer162
viewsHow to show audio preview while playing?
Hi guys from stackoverflow, Have an example Github, showing audio preview. How to do this in Asp.net mvc ? View: <audio controls style="width: 375px;height:225px;"> <source…
-
0
votes1
answer415
viewsHow to return only the ref. data to the logged in user
I have a table that returns the following data from an SQL Server database: INITIAL KM; KM Final; Liters; R-value$. However I would like to return only the values ref. to the logged in user. In the…
-
0
votes1
answer537
viewsHow to show PDF using server Viewer.js?
On the View page, I have the following code: <iframe style="width:800px; height:550px;" id="FileReload" src="@Url.Action("GetPDF", "Account", new { id = Model.Id })"…
-
0
votes1
answer40
viewsDatapicker com @Html.Editorfor
I have the following model [DisplayName("Data Inicial Contrato")] [Required] [DataType(DataType.Date)] [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:yyyy-MM-dd}")] public…
-
0
votes1
answer963
viewsChange Title to display tooltip
I’m validating the email using tooltip to display the message. If at first the guy puts registered email the search is made and displayed the message that the "Registered Email", if he changes the…
-
0
votes1
answer1696
viewshow to call the file function . js
I am unable to call a javascript function from a file. Ex: Filing cabinet: javascript inside the briefcase raiz/scripts/javascript.js function responsivo () { $('#responsivo').popover({ //trigger:…
-
0
votes0
answers89
viewsAsynchronous Action Error (Async)
This action should send an Asynchronous email, all very simple so far, including using the same class in other projects with the same version of MVC. But to my surprise, this project does not run.…
-
0
votes1
answer82
viewsI can’t do include
I try to make include, but the message appears : In some of the research I’ve done they say to include using System.Linq; using System.Data.Entity; but mine already contains these. My classes are:…
-
0
votes2
answers161
viewsCustomized Viewbag, how to do?
I need a custom Viewbag, which brings the name of the teacher and the id, referring to the registered school, for this I did: ViewBag.ProfessorID = new SelectList(from u in…