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
-
0
votes1
answer37
viewsProblem with dropdownlist auto-refilling
I’m having a small problem with the dropdownlist of Asp mvc 5, I need to automatically fill the value of the dropdownlist as soon as the user enters the search screen, I was able to get the value in…
-
0
votes0
answers37
viewsAsp Net MVC site does not display items i class
I created an e-commerce site in Asp Net MVC standard, when running the site in Visual Studio by ISS it loads all the "i class" icons and the value field I defined as Follow Console output when…
-
0
votes0
answers53
viewsWhich is faster? Looking for data in the bank or reading a cookie?
Guys, in your opinion, what would be better in this situation? I’m working on an Asp MVC and Entity Framework website. I have a table of federative units where I have (simplifying) 3 columns Id,…
-
0
votes1
answer443
viewsUsing SQL Query with Asp MVC5
how do I execute an SQL query with ASP MVC5 + Entity? Example, I need to use "Count" in a table called "templates" am dev php and am learning now Asp.net framework mvc 5 and have no idea how to do…
-
0
votes1
answer220
viewsGet the value of custom attributes in aspnet-Identity . NET CORE 2.0
I’m using the Identity with aspnet core 2.0 and I needed to add the attribute nuCPF on the table Applicationuser. In the controller I am getting the user data as follows: [Controller:…
-
0
votes0
answers32
viewsIt is possible to create a pager in a view-Component?( Asp.net MVC View-Component)
I have a view with a view-Component What a list of news stories. I want to make a pagination of this news within this view-componet. Paging should be inside the view-Component, as do for this html…
-
0
votes1
answer45
viewsTake data by url (string was not recognized datetime)
I am passing an initial and final date per parameter (according to the image), as you can see in the localhost the bars (/) I am passing %20 and normally the generation of graphics occurs, but on…
-
0
votes1
answer321
viewsMy _Layout.cshtml file is not being recognized in the application, what to do?
I’m making an application in MVC Asp.net, and suddenly my application no longer recognizes the layout file being no longer applying the bootstrap and jquery... How can I fix it?? My layout file is…
-
0
votes0
answers45
viewsHow to apply the form input validation classes of bootstrap v4 with the ASP.NET Razor syntax?
Follows code: View: <div class="form-group"> @Html.LabelFor(m => m.Telefone, new { @class = "font-weight-bold" }) @Html.TextBoxFor(m => m.Telefone, new { @class = "form-control",…
-
0
votes1
answer316
viewsError handling in C#!
Guys, the following is, in my application I would like to see a page with the error occurred, but that this page has all the formatting proposed in the layout, so this is not happening, because it…
-
0
votes1
answer53
viewsBecause when I’m treating an error it doesn’t load the _Layout file?
I am doing an error handling using Json Result, when displaying the error message I should display the page formed as it rules in the _Layout file, so the page is loading all blank, does anyone know…
-
0
votes2
answers53
viewsAttach dropdowlist item and a li Asp.net mvc
I have a view with dropDowlist that contains data that comes from the database and just below put a buttom that when I click will attach the selected dropdownlist item in a list, I made a code here…
-
0
votes1
answer30
viewsinput is not pulling right bank value
I need some help. On my system, I have an input that brings back a date from the database. As you can see in the photo above the date informed is 06/09/2017 00:00, only that the actual date of this…
-
0
votes2
answers655
viewsCall the controller via javascript or ajax and insert in table Asp.net mvc
How can I get an item from ul li pass its value(id) to my controller and insert that value into the table? I already have the list this chunk of code below already works I can add items in the list…
-
0
votes0
answers398
viewsFileupload Jquery with C#
I have the following problem I am using MVC (C#) and I need to upload documents in general(. doc, . pdf , . png, etc) I am using the Fileupload library and jquery 3.1 In the example pattern that the…
-
0
votes1
answer37
viewsDoes not list database data correctly in View Asp.net
The data was entered into the database, but the View does not show one of the fields. I checked in SQL Server and it’s all right, but the name field returns empty in view public ActionResult Index()…
-
0
votes1
answer40
viewsGet parameter by url for my controller
I need my controller to get a parameter from a URL (localhost/Check/123456), where 12346 would be the parameter. I configured the Routeconfig: public static void RegisterRoutes(RouteCollection…
-
0
votes2
answers1065
viewsHow to Paginate Data with Pagedlist in Asp.Net MVC?
I have a user table with 10,000 entries. I want to paginate these records using LIMIT and OFFSET with Pagedlist but I’m not able to do that. Currently the system searches all records to then…
-
0
votes1
answer911
viewsReturn data from 2 Entity framework tables
I have the following table: Moving -moving -Clienteid -Productoid When I select a particular customer I want to list all drives in which they are along with the product. what I would call it inside…
-
0
votes1
answer681
viewsHow to fill a Dropdownliste with ASP MVC
Good afternoon, as I can fill a dropdown with data from a database using pure Ado.net (code) and without using Entity framework? I have two tables in my bank that relate. First I must register a…
-
0
votes1
answer218
viewsUpdate Dropdownlistfor in form
I have a form that has two @Html.Dropdownlistfor among other fields. However, when changing the first Dropdownlistfor I need to update the values of the other dropdownlist by passing its id as…
-
0
votes1
answer930
viewsSystem.Nullreferenceexception: 'Undefined object reference for an instance of an object
I was trying to run my database but this error appears. System.Nullreferenceexception: 'Undefined object reference for an instance of an object. con era null using System; using…
-
0
votes1
answer60
viewsWhat’s wrong with this form?
Guys, I have an Asp.net mvc application that will only have a single page, which is index.cshtml. On this page I have a contact form, so he is not sending the captured message to my email, someone…
-
0
votes2
answers53
viewsSend Post with Template data that attributes are classes
I’m trying to send a Post through a form, but in the controller the attributes that are classes are arriving as null, as I should do so I can get the data right so I can register in the database?…
-
0
votes1
answer333
viewsSite opens but does not load Cs, js, png files etc
I migrated VS2012 to VS2017, and in my solution I have 3 sites, 2 of which I run and have no problem and in the other when I debug it opens but the whole part of Design is not loaded(css, js, png,…
-
0
votes1
answer124
viewsValidate attempted fraud when editing record with C# MVC
In my applications was leaves the entity ID inside HTML being a hidden object. Example: @Html.HiddenFor(m => m.EntidadeID) But, I identified that I can edit HTML easily and in POST I can receive…
-
0
votes3
answers182
viewsError submitting form with ASP MVC
I am facing a problem submitting a form developed in ASP MVC. By clicking the save button the following error message is returned: System.InvalidOperationException: 'Não existe item ViewData do tipo…
-
0
votes1
answer4944
viewsHow to consume webAPI REST ASP.NET MVC
Good is the following, I am developing a service Rest and an application that will consume this web-service (VIA BROWSER SAME). In my project, I have the model (in this case my Oracle database), My…
-
0
votes1
answer198
viewsRecover data from View Asp.net
I have following problem, when I place an order in the quantity field when I place a certain number I have to arrive if I have in stock in the bank, and if I have to reduce the quantity in the…
-
0
votes1
answer215
viewsEntity Framework Asp.net mvc data comparison
I need to receive the value and quantity in stock of a particular product according to your Id.By debug the product id is arriving correctly, but when I am going to assign the values to the table…
-
0
votes2
answers31
viewsCompare shorter term between Asp.net columns
Making order system, I have several warehouses, let’s assume I have to compare 2 warehouses that have shorter delivery time using entityframework,how would I do that? I’m trying to do more it just…
-
0
votes0
answers603
viewsShow Total order value on View Asp.net mvc
I have a View Index where I will show the name of the store the order total and sum all orders and show the total value. I created a Reportstore. I can get total orders. In my table it is already…
-
0
votes0
answers385
viewsSqlbulkinsert- Import Excel Spreadsheet
I have a dotnet application to import spreadsheet, but I don’t know why I’m not able to enter the information in the database. My code is below. using System; using System.Collections.Generic; using…
-
0
votes1
answer83
viewsSeed Method for Many-to-Many Relationships
I am developing a simple application in MVC using Entity, being of registration of products, I am using the metodo seed to insert the values in the table, but in the relationship Many-to-Many I…
-
0
votes0
answers361
viewsProblems with Javascript accentuation - Asp.net Core
Every text I write in Portuguese on buttons, etc, gets problems of accentuation in javascript. What I need to do? //Trecho do meu arquivo _Layout <!DOCTYPE html> <html class="no-js…
-
0
votes1
answer146
viewsSet Value Default @Html.Dropdownlistfor via Json - ASP.NET MVC5
I am making a timekeeping page using ASP.NET MVC5. The user enters the markup data as shown below: However, if any error occurs in the registration of the tag, the controller returns the model to…
asp.net-mvc .net json asp.net asp.net-mvc-5asked 6 years, 9 months ago Wagner Barbosa Do Nascimento 43 -
0
votes1
answer535
viewsCall Action as parameter in Html.Beginform - ASP . NET MVC 5
I have a code that queries a Webapi, writes to the database, and queries the database, in this application, a view that has 3 buttons, namely: Consult Ws Inserts BD Comic book consultation I am…
-
0
votes1
answer141
viewsSave time of registration in the database
I have a form and whenever someone register, I need to save the time of registration in my table Historico2 inside the property DateTime? Quando. public partial class Historico2 { public int ID {…
-
0
votes1
answer51
viewsError when publishing a website developed in Asp.Net MVC
i did all the step by step to publish a website I developed using the Asp.NET MVC on the web server therefore after completion it opens the page in the given domain and is displayed that following…
asp.net-mvcasked 6 years, 8 months ago WPfan 786 -
0
votes1
answer68
viewsDoes not display data on the Web Api Asp.net mvc screen
I started studying a bit of web api using Asp.net, I’m doing a very simple example where I just want to list the data from the employee table, but I get error: No Mediatypeformatter is available to…
-
0
votes1
answer846
viewsConfiguration of the Web.Config file
I wonder if I can leave the recipient’s email on web.config, if I can, how to deploy. I created a variable and gave the value of the email, but if I need to change I will have to compile dnv, if I…
-
0
votes1
answer75
viewsHide td nulla in JAVASCRIPT print
On my system I made a button to print a screen. It’s working all correctly, the problem is the following. In the picture below you can see that the part of Current User is coming nulla, as it has no…
-
0
votes0
answers133
viewsHow to define a color of an Html.Displayfor?
In my application I have this Html Helpers: @Html.DropDownList("estado", new List<SelectListItem>{ new SelectListItem {Text="Pago", Value="Pago"}, new SelectListItem {Text="Pendente",…
-
0
votes2
answers90
viewsWhen field validation is triggered, dropdownlists do not load into Asp.net core MVC
When I start a registration screen, the system loads a ViewModel with the combobox loaded: If I, for example, click the record button, the fields in my viewmodel are validated, only the page does…
-
0
votes2
answers31
viewsJsonresult values are received by javascript but fields do not receive value
Javascript function receives values but fields are not receiving values. Function of the Controller public JsonResult GetSequencia(DateTime dataAbate) { db.Configuration.ProxyCreationEnabled =…
-
0
votes0
answers41
viewsDropdownlist Asp.net mvc
I have a product that can be registered in 2 stores A and B if I have already registered in A how do pro Dropdownlist show me only show option B next time it is in register? what would be the logic?…
-
0
votes0
answers22
viewsDisplay Null Variables in a Modal
Guys I’m having the following problem. I had to create an audit page of my system, where it displays the edits that were made in a certain form. When a form is first filled in, it shows all the form…
-
0
votes1
answer264
viewsNot null parameter in Int fields
I am creating an application in Asp.NET MVC (I am using the Scafffolded feature), however, all the whole fields are being required to be filled in, as I remove this parameter? Note: I have tried to…
-
0
votes1
answer113
viewsTranspose list of objects
How can I transpose the columns of a table like the one in the image below For this format: Mercado | Semana 5 | Semana 6 FUT AUD | 0.9986 | 1.0035 FUT CAD | 1.0000 | 1.0062 FUT CHF | 1.0059 |…
-
0
votes0
answers44
viewsWhat’s wrong with that method?
I’m creating an Asp net mvc application, I created a domain class with: public class Parcela { public int parcelaId { get; set; } public decimal valor { get; set; } public DateTime vencimento { get;…