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
-
1
votes1
answer117
viewsProblem to fill date field with ASP.NET MVC, Razor
I’m making a mini registration system, it has the place to edit a client’s registration, when I click edit it comes the data in the fields for me to edit, all fields comes normal, except the field…
-
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
answers18
viewsHelp with Entity framework
Hello everyone I have sequinte select, which joins 3 tables. This select works in the bank. I would like to make this same select using Entity with Asp.net mvc. But I have no idea how to do it. Any…
-
1
votes2
answers133
views.Net Core 3.1 - How to use Enum to replace code string
Separate file: public enum LANG { NOT_SET = 0, ENGLISH = 1, PORTUGUESE = 2 } File in which I want to put Enum that is currently being validated with string: public bool Validate(StructuralData data)…
-
1
votes0
answers24
viewsJquery Ajax does not display Object in the PUT method, using . net mvc
I own the Object var obj = { nome: "Felipe", idade: 23 } I created an ajax call by jquery like this: $.ajax({ url: 'ConfigCode/UpdateOptionsStatus', // route controller na web type: 'PUT', data:…
-
1
votes0
answers25
viewsConvert a String to Ienumerable<Selectlistitem> in ASP.NET
Speak, guys, I’m new in the area of ASP.NET and studying Identity I came across a typo error when performing a new user registration. The project was done with the authenticity of the VS. I did the…
-
1
votes1
answer44
viewsDoubt on authentication/authorization based on access profiles with Webapi Asp.Net Core MVC
I have here a Windows Forms + Sybase application that has an authentication scheme based on access profiles. The diagram of the database is as follows: On the table Permission we have descriptions…
-
1
votes1
answer29
viewsThere is [Fromuri] equivalent in Java Spring MVC
In ASPNET MVC, we have the following code snippet that sends information through queryString and is received in an endpoint which has a parameter of type Dtorequest and through the attribute…
-
0
votes3
answers403
viewsLog reading to infer counter
I have a template called Request and this template has a column called Number. This number has the following structure: YEAR + COUNTER. It just so happens that every time I create a new request I…
-
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
votes1
answer257
viewsRenderaction does not consider my validations in ASP.NET models
Renderaction stopped considering the fields marked as [Required] on my models. Example of one of the models: private uint IdNews { get; set; } [Required(ErrorMessage = "Defina o título.")] public…
-
0
votes1
answer2060
viewsOCI-22053: overflow error - C#
I am developing a web application in MVC with C#. I made a method that makes a select in my bank oracle and with the value returned I fill a DataTable. But it returns an error the moment I run…
-
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
votes1
answer106
viewsIs it bad practice to return Viewmodel from a Webservice?
It is a bad practice to use the same class that is used as Viewmodel, that a Action passes to the View, to return data from a Webservice? (like those methods marked with [WebMethod]) I imagine not,…
-
0
votes3
answers3813
viewsReports in C# MVC
How do I report to c# Asp.net-mvc-4? I use a third-party component or make an HTML page myself? What you use in everyday life? I ask, because I need to print reports that follow a government…
-
0
votes1
answer104
viewsResources on app_globalresource
I have a class library where I added a file resx, someone knows how I can in Runtime put this resx in app_globalresource to make it available in all my app web mvc?…
-
0
votes1
answer528
viewsError generating Pie Chart "pie" in ASP.NET MVC highchart
I’m having trouble generating a pie chart in the style of Highcharts. I have the following code to generate the series: if (vlrTot1 >= 0) { Dictionary<string, object> aSeries = new…
-
0
votes1
answer120
viewsurl in MVC project of an . html
would like to create a . html that will serve to be the menu of _Layout.cshtml, I will call it through $("#IDMenu").load('menu_Home.html'); My question, where better to leave it? I can leave it in…
-
0
votes1
answer1135
viewsHow to pass parameters to the _Layout.cshtml view in Asp.Net projects
Hello, seeing as I have one Area control panel my layout basically changes only the center with the views, but I want to put functionalities in the part where the _Layout.cshtml, and for such…
-
0
votes1
answer579
viewsWhy is the Entity Framework generating a new record in the database?
Next, I’m working on a new project Asp.net-mvc, and I have 3 classes. public class Anuncio { public int AnuncioID { get; set; } public string UsuarioID { get; set; } [Required] [MaxLength(255)]…
-
0
votes1
answer188
viewsVisual Studio keeps giving error in the ASP.NET MVC 5 project
Hello, I’m trying to open an ASP.NET MVC 5 project and is giving the following error: Can someone help me? I already installed the updates and MVC 5. I installed the web pages through Nuget:…
-
0
votes1
answer79
viewsControllers should have a single responsibility?
As well as the classes and objects of an application, mine controllers should have a single responsibility? Example. I have my controller Cliente, who has all relations with my model Cliente. I also…
asp.net-mvcasked 10 years, 6 months ago Rod 9,412 -
0
votes1
answer88
viewsJavascript can not find page in Aspx
I have an application in ASPX and C#. Inside the application’s "Scripts" directory, I have a js with the following code: function RecuperaDados(valor){…
-
0
votes1
answer298
viewsRazor - @Html.Dropdownlist with dynamic name
I would like to concatenate the ID I get from @Model in the property string name of the Dropdownlist, because I would like to treat them dynamically. I try to do @Html.Dropdownlist("Name" +…
-
0
votes1
answer1765
viewsHow to render Action by accessing controller in this case?
I’m using a ready template and I use the bootstrap, but the menu transaction is done through javascript animations and with the tag <Section> html, as follows: <section class="section"…
-
0
votes1
answer205
viewsWeb API - How to validate the model from Dataannotation.Remote()?
I have the following model (DTO): public class PessoaAcesso : Pessoa { [Remote("LoginUnico", "Pessoa", ErrorMessage = "Esse Login já existe! Escolha outro.")] public virtual string Login { get; set;…
asp.net-mvcasked 10 years, 3 months ago felipearon 715 -
0
votes1
answer231
viewsMap Id of one model to another without a Dropdownlist
I had a problem making relationships in my application. my project is from a school, and in it I have to have the occurrences. But when it comes to relating the Student to the Occurrence happened to…
-
0
votes0
answers383
viewsMysql Connector MVC
I installed Mysql Connector and local I was successful, I was able to make the connection and even do my Migration. However, after giving Publish in my project and go up in FTP, I am encountering…
-
0
votes1
answer454
viewsIs DAL class required for database connection?
Is it necessary to create a file for a database connection? According to a teacher of a colleague of mine it is necessary to have this DAL class to make the connection with the bank. But the book…
-
0
votes1
answer563
viewsHow to pick up Radiobuttonfor value through Formcollection and save to SQL Server BD
I have a model with several booleans, I need to take their values through a Formcollection and save in the SQL database (does not accept Boolean, so the field is as bit). My View: <div…
-
0
votes2
answers1264
viewsMeasure time the user is logged in to the system
I need to know how much time the user spends on the system. That is how long it remains, from the moment it makes the login, to make logout OR close/browser/disconnect PC/disconnect connection, etc.…
-
0
votes3
answers647
viewsDynamically load from the bank and mount a treeview in cshtml I’m not getting
is as follows. I am not getting satisfactory results in assembling a tree using checkbox as in a treeview. Well, when I put the fixed data works very well. But when I bring the BD data, that’s where…
-
0
votes2
answers4814
viewsForeach within a cshtml(view) from a controller
I made a code using Linq and jQuery. Turns out you’re giving me a problem I can’t solve, which is creating a Treeview dynamically. Then I had another idea. To do the foreach right in the View…
-
0
votes1
answer495
viewsEntity Framework without primary key
I have the following problem: Every time I update the Diagram model of my project, it loses the reference of which field is the primary key, even I try the PK in the table in my Database. Does…
-
0
votes1
answer1055
viewsSend a modelView as parameter to a modal bootstrap
When searching for how to render a partialView in a modal bootstrap, found this link: Using Bootstrap Modal window as Partialview, only I need to make a request POST by clicking the button that…
-
0
votes1
answer261
viewsHow to customize routes?
I have a controller called login and a view of the same name. When I access the login page, the URL is displayed this way: ~/Login/Login It is possible to customize this route, so that the link…
asp.net-mvcasked 10 years, 2 months ago Ryan Santos 515 -
0
votes2
answers197
viewsError making an insert in the database
I am trying to save some data in the database and am getting this error: The INSERT statement conflicted with the FOREIGN KEY Constraint "Fk_dbo.Occurrences_dbo.Alunoes_alunoid". The Conflict…
-
0
votes1
answer325
viewsInvent Registration Confirmation Procedure
The idea is after making the registration, send the user an email containing a link, where he can actually confirm the registration and only release the permission to log in. Just to have a little…
-
0
votes0
answers167
viewsMessaging System
I’m looking to implement some elements of communication between users of my application. I thought about creating something that would allow messaging, something like Facebook, but it doesn’t have…
asp.net-mvcasked 10 years, 1 month ago Ryan Santos 515 -
0
votes1
answer931
viewsViews Typed in ASP.NET MVC, using Viewbag
I wonder if all View on Mvc has to be typed? I want to take values from a form but those values are not from the same entity. I am using a helper: @Html.TexBoxFor(model => model.Nome) I would…
asp.net-mvcasked 10 years, 1 month ago Rabelos 161 -
0
votes1
answer274
viewsDifficulties in feedback a Textbox and a Combobox with jQuery
I have no difficulty in passing any value from my View to my controller via jquery. Now the opposite I get nothing. I tried so: $('#meutextbox).val() = data.minha_result_da_controller.meu_campo; So…
-
0
votes1
answer259
viewsRepeat div with foreach?
I have a list of registered users displays the most important data such as name and email. I created a div to display this data. However, I do not want to display everything in the same div, I would…
-
0
votes1
answer358
viewsMVC Webapi Ajax error on type-approval server only
I have a mvc page that calls a method in the webapi (another project within the solution), it turns out that in the localhost everything works normally, when it will homologation, when calling the…
-
0
votes0
answers181
viewsDoubt about use of virtual directory in IIS and filetable
I need to store files in one FileTable. As I do not know the local path where the files that are in FileTable stay, I peed the network path of the directory of FileTable, and thus access the…
-
0
votes1
answer347
viewsPopular a List with database data accessed by Entityframework
As popular as mine List, in C#, with the data stored in the database accessed through the Entityframework? Current code: public static IEnumerable<Contato> GetAll() { return new…
-
0
votes1
answer1032
viewsAction redirect another Action using Partialviewresult
public PartialViewResult Index(string quantidadeRegistro) { int qtd; int.TryParse(quantidadeRegistro, out qtd); var bdPedido = PedidosAplicacaoConstrutor.PedidosAplicacaoEF(); var bdCliente =…
-
0
votes1
answer762
viewsAspnet Identity Roles - Custom
My application has user groups that are customizable, that is, the end user creates and puts access to certain permissions. For that, I have my records Module, Menu, Item, Option Module = Financial,…
asp.net-mvcasked 10 years, 5 months ago Rod 9,412 -
0
votes1
answer2760
viewsReturn after Httppost in Partial View
Good night, I’m working with Bootstrap 3 tabs, and I have the following structure: View.cshtml <div class="tab-content"> <div id="tab_cooperado" class="tab-pane fade">…
-
0
votes1
answer301
viewsHow to get value from a Radiobutton field in JS?
I can’t get the value of my field RadioButton @Html.Label("Ativo") @Html.RadioButtonFor(v => v.Ativo,"S", new { name="ativo"}) @Html.Label("Inativo") @Html.RadioButtonFor(v => v.Ativo,"N", new…
-
0
votes2
answers1013
viewsC# MVC EF5 delete relationships
Hello, I am developing an application using C# MVC and EF5 and I have the following problem: I have a customer group management screen, in this group I can insert and remove customers, I use a…