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
votes1
answer448
viewsHow do I profile security with Asp.Net MVC?
I am creating a system using Asp.Net MVC and before I start I need to do profile-based security. I’ll have multiple profiles each with an access option. For example: Admin Profile (access all),…
-
1
votes1
answer345
viewsWhen running the POST passing object via the URI of a Webapi, the object arrives as null in the method
I am a few days beating head with this problem I have a fronted MVC5 application and it sends an object to another Webapi application in a Save method(). See the code of my Frontend application that…
-
1
votes1
answer76
viewsLike I create a Dropdownlist for MVC5 ASP.NET
Hello I’m having difficulty making a Dropdownlist, I have 3 classes a Entities to have relationship with the bank, A Gender that is associated with the Work class. [Table("Generos")] public class…
-
1
votes1
answer130
viewsHiddenfor - Submit loses value the first time
Follows code: Index: @{ ViewBag.Title = "Home Page"; } <div class="modal fade" id="minhaModal" tabindex="-1" role="dialog" aria-hidden="true"> <div class="modal-dialog modal-lg"…
-
1
votes2
answers655
viewsValidation of fields from Razor forms
I’m using MVC5 Razor to create my forms, now I have a question for field validations of that form; Example: @Html.LabelFor(m => m.Nome, "Nome:") @Html.DropDownListFor(m => m.Nome, "Nenhum" ,…
-
1
votes1
answer458
viewsPartialview relationships Asp.net mvc 5
I’m having trouble creating the logic of registering models that has relationship between them. One exists only the reference, but in the other the reference is of type List<>. I created a…
-
1
votes3
answers5808
viewsProblem running Visual studio debugger
I have a problem in my project, I use ASP.NET MVC 5 and for a while I get this message whenever I run my project, the problem is not the visual studio installed on the machine(as in that solution)…
-
1
votes1
answer81
viewsForeach in an Actionresult of details
I have an entity Registering who owns a Professor, the Professor has a list of Registering. How can I create a foreach in View details of Registering to list the name of Professor which belongs to…
-
1
votes0
answers487
viewsASP.NET MVC 5: Link two models in the view
I have the following scenario: Agendaviewmodel.Cs public class AgendaViewModel { [HiddenInput(DisplayValue = false)] public int Id { get; set; } [HiddenInput(DisplayValue = false)] public int…
-
1
votes0
answers262
viewsReturn a Partialview in ASP.NET MVC
On returning a Partialview my action can both have as a return Actionresult as a Partialviewresult. public PartialViewResult Franquias() { return PartialView("_Franquias"); } Or public ActionResult…
-
1
votes1
answer884
viewsGoogle Charts with SQL Server
Hello, I’m trying to develop some graphics in a web application Asp.net MVC 5, regarding the development of the report, quiet, leaving with fixed information. But, how can I integrate the graph with…
-
1
votes1
answer227
viewsReload Jqgrid by passing filter parameters
It is basically to make the Jqgrid function receive parameters type(date: {} ), by the events .change and update the grid. I have a grid that is loaded along with document, but need to implement…
-
1
votes1
answer188
viewsError while initializing database on server in Asp Net Mvc!
I have a finished application developed in C# using Asp Net MVC. On my local server the application connects to the database that is on the server of the company that I work, so when putting the…
-
1
votes1
answer843
viewsError running Dropdownlist on ASP.Net MVC
I’m having the following error when turning: System.Invalidoperationexception: 'There is no 'Ienumerable' Viewdata item that has the 'Sexoid' key'.' Follows code below: Model: [Required(ErrorMessage…
-
1
votes0
answers289
viewsScan Excel table data and save to SQL Server (Asp.Net MVC 5 C#)
I have an input file that the user will upload the spreadsheet, I need to check if it is .xlsx or .xls and scan the data from this spreadsheet. After that, I need to save to Sql server those items.…
-
1
votes2
answers396
viewsGet next record on a grouped foreach
How could I be selecting the next record within a foreach grouped before it ends, without advancing on that loop? The point where I think I might be getting this information is where it’s written…
-
1
votes1
answer65
viewsHow to set a photo upload as a must
I am developing a page, for job applicants can enter and fill your personal information, one of these information is the photo, which has to be mandatory. So I created the following model: { . .…
-
1
votes0
answers258
viewsLocal connection Sql Server Express 2017 - Asp.Net MVC
I’m trying to connect in Sql Server Express 2017 via Visual Studio (local connection), but keeps returning me this error always when you try to open: A connection to the server was successfully…
-
1
votes1
answer1719
viewsInconsistent accessibility: "value" parameter type is less accessible than "value" method
Inconsistent accessibility: "Iclientmanager" parameter type is less accessible than "Clientecontroller.Clientcontroller(Iclientmanager, Usermanager) Controller: public class ClientController :…
-
1
votes1
answer86
views"Jsonresult" does not contain a constructor that accepts 0 arguments
I am trying to return a Jsonresult to my View, but it is returning the following error. "Jsonresult" does not contain a constructor that accepts 0 arguments You could help me friends ? [HttpGet]…
-
1
votes1
answer70
viewsHow to pass a parameter together with the Model to a Partialview when rendering it
To create some fields dynamically, I’m using a render and render. When calling Partial _Contact, I would like to pass the [i] value of the for index to sort the fields. It is not working... You’re…
-
1
votes1
answer144
viewsOutput Cache ASP . Net MVC
I am studying on the output cache in Asp . NET MVC to improve the performance of my application. From what I’ve seen it can be stored in many places like: · Any · Client · Downstream · Server · None…
-
1
votes0
answers100
viewsUse 2 models in a View, but separate them in the form submission
I’m getting the following error: 'Addemployeeviewmodel' does not contain a Definition for 'Officeemployee' and no Extension method 'Officeemployee' Accepting a first argument of type…
-
1
votes1
answer44
viewsHelp with Linq Method using group by Dinâmico
I need to mount a dynamic graph from a filter panel and two fields select that can be crossed. I already have the structure that goes to the graph and how I need to return from backend. In the case…
-
1
votes1
answer198
viewsHow to disable ZIP Mask to save only Typed numbers when performing a Post - Asp.net MVC
I’m using a Remark component that has a data-plugin="formatter" where it applies a CEP mask to field. The field has a size of 8 characters, but the mask has 9 because of the "-" (Ex: 29780-000).…
-
1
votes1
answer281
viewsDynamic table MVC
I need to return the result of the trial, I put a fixed value just to perform my tests but it will have an input typed, in datepick. However I cannot create the list for the columns. Follow the code…
-
1
votes1
answer36
viewsAsynchronous method
Good morning, I have an ASP.NET MVC 5 application that opens IT calls, I have a procedure that triggers e-mail to users at the end of the task execution (completion, opening, forwarding, etc. of the…
-
1
votes1
answer49
viewsNo constructor without parameters has been defined for this object. , Asp net mvc
When I will perform the insertion of this data in the table, this error occurs: No constructor without parameters has been defined for this object. Follow code with constructor: [HttpGet] public…
-
1
votes1
answer180
viewsMake Distinct Entity Framework
I’m trying to accomplish the Distinct, in my model of Phones, but none of the options I’m trying to make work. Could tell me what I’m doing wrong ? Below I described several ways I have tried to do,…
-
1
votes0
answers49
viewsLegacy application repository standard - ASP.NET MVC 5
I am participating in a project using ASP.NET MVC 5, I would like opinions to form a concept in which I can achieve good results with a good team productivity. What I have of interfaces: Irepository…
-
1
votes0
answers33
viewsUpdate does not commit bank changes
Good night, you guys! I’m new to ASP NET MVC and I’m making a CRUD simple with bench Postgresql. I’ve already implemented the Insert, delete and Get, but the Update is not saving the changes in the…
-
1
votes1
answer57
viewsProblems creating Postgre backup on Asp.Net MVC
I didn’t find much information about creating Postgre backups with C#, so I created this post. The process is simple... I am creating a process that executes a command and passes some parameters…
-
1
votes1
answer175
viewsHow to leave field with bold values
Situation I have a table made in html called Payments and in it I have a column called values, I want to leave the fields with values in bold. Problem: There are collaborators who had value to be…
-
1
votes1
answer81
viewsHow to pass an Enum type parameter together with the Model for a Partialview - Asp.net Core MVC
I’m having a hard time passing an Enum parameter to a Partialview using Viewdata. It is giving conversion error (in Partialview), because the received type seems to be string or other type and is…
-
1
votes1
answer35
viewsBring value Dropdownlist ASP.NET MV5
I’m bringing a dropdown of a table of Physicians in the View and it brings normally, but I want to take the value of it (Selected name) in the jQuery to bring other information after selected. But…
-
1
votes0
answers98
viewsProblems accessing external C#API
I am trying to access the Pagseguro API to view the account balance but the following error appears. (I deleted my email and token in the print as well as in the code below). Document print: Code on…
-
1
votes0
answers25
viewsInner Join with evaluation before result
I have a select that is being done with several Ner Join. However one of the time clauses returns empty or time returns full. We already know the reason for the void but we don’t know how to get…
asp.net-mvc-5asked 5 years ago Leandro Piccinelli 11 -
1
votes1
answer64
viewsProblems using null coalescing
I’m having trouble using the null coalescing in the case below: When trying to use operand ?? to validate if the value reader["Data"] is void, and if the DateTime.MinValue. The error that returns…
c# asp.net-mvc asp.net-mvc-5 asp.net-core datetimeasked 4 years, 10 months ago Demetrius Pecoraro 36 -
1
votes0
answers21
viewsUpload files using ASP.NET MVC, AJAX and jQuery
I have the following problem when uploading file to ASP.NET MVC with AJAX and jQuery it enters the if that checks if Listings files != null and arrives in Console.Writeline(source.Filename); to…
-
1
votes1
answer46
viewsField with Datetime format does not change the format to Date - Asp.net MVC
I need to show only the date format in a Datetime field, but only letters are appearing in the field (even if the value property contains a date). VIEWMODEL: [DisplayFormat(ApplyFormatInEditMode =…
-
1
votes1
answer32
viewsOn which project layer with DDD concept, should I create a function or routine for the reorganization of portions of a receivable?
I have an Asp.Net Core MVC project in which I am developing an Accounts Receivable. The whole project uses the DDD concept. I need to create a function to reorder the sequence of parcel records in…
-
1
votes1
answer18
viewsProblems getting a Viewmodel with decimal values using Ajax
When you Get using Ajax, viewModel is coming to the Controller with the fields reset. I’m creating the class manually, converting it and doing the GET. I cannot figure out the reason for the…
-
1
votes0
answers37
viewsHow, after a POST request, to insert values into another table automatically with the Entity Framework
Good night! I have the following question: I have 3 tables (Students, Etapasala, Classroom) As you can see, Etapasala is a connecting table between the student and the classroom. I’m using the MVC…
-
0
votes2
answers675
viewsHow to enable the "Add Controller" option in the menu?
Recently the option of mine Adicionar controller is off the menu. I’m using Visual Studio 2013, and the project is ASP NET MVC, version 5.1. How to fix this problem?…
c# asp.net-mvc visual-studio-2013 asp.net-mvc-5asked 10 years, 9 months ago Ivan Ricardo Lopes 1,376 -
0
votes2
answers437
viewsAssociate a controller to an existing view
Usually when we create a Controller and associate a View to a Action, right click on Action and Add View. Then he creates the View, the folder and etc. Now, and when there already is one View, and I…
asp.net-mvc-5asked 10 years, 8 months ago pnet 14,727 -
0
votes1
answer733
viewsWrite with MVC and jQuery however the data is coming null
I made a jQuery to get the data from the form. And I made a method in my controller to save to the Database. It turns out that the form data is coming null. What can it be? Below my jQuery and my…
asp.net-mvc-5asked 10 years, 8 months ago pnet 14,727 -
0
votes3
answers3981
viewsDeclare variable within my cshtml
I have this code in my cshtml file <div class="grid_19 box-resultado"> @{ string nm, dia, mes, ano, sexo, numpassaporte, diavalidade, mesvalidade, anovalidade, paisemissao, dados = ""; .......…
-
0
votes2
answers2219
viewsHow to upload multiple images with just 1 click?
I’m studying uploading images and files, and I can upload 1 image, and show it on the screen, but I’m interested in uploading multiple images with only one button, just like this web application…
-
0
votes3
answers122
viewsJquery does not return the minimum value when using Math.min( )
I have the function: $(this.SubOfferGroups).each(function () { $(this.AnswerOffersList).each(function () { menorValor = Math.min(this.SalePrice.DefaultValue); }); }); When entering the array…
-
0
votes2
answers1465
viewsASP.NET MVC - Route does not pass values to the Controller
I created a new Controller with name Conteudo. Then I created an Action on it called conteudo and added a new View called Conteudo. Before it was PaginaBase and the Controller of Home. Well, I…
asp.net-mvc-5asked 10 years, 8 months ago pnet 14,727