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
votes0
answers111
viewsFormat cell size in . csv files
Gero esse csv public ActionResult geraExcel() { List<vwFinancingReportViewModel> lista = new List<vwFinancingReportViewModel>(); lista = dadosPlanilha(); StringBuilder sb = new…
-
1
votes0
answers33
viewsDisplay two Actionresult from the same Controller on the Index page
I’m already displaying a table in Index, only I want to display another table from the same controller. I created a PartialView calling for PartCorteCabos() and created a view of it. I tried to make…
-
1
votes1
answer638
viewsGet value from a view field in a controller
From the answers here, I couldn’t catch it. I have this view @{ ViewBag.Title = "ExcelFinancing"; Layout = "~/Views/Shared/_Layout.cshtml"; } <!DOCTYPE html> <html lang="pt-br">…
-
1
votes0
answers263
viewsReturning Error View after calling a Modal pop up
Hello, I have a problem with the front end of my application. I have the following method to return errors: public class ErrorController : Controller { //Erro 500 Servidor public ActionResult…
-
1
votes2
answers80
viewsGenerate model-based Migration (Entity Framework)
I’m trying to generate a model-based Migration: [Key] public int Id { get; set; } [MaxLength(100)] public string NomeInstituicao_Fundamental { get; set; } public string AnoInicio_Fundamental { get;…
-
1
votes1
answer40
viewsDatabase First approach with Lazy Loading disabled?
I’m starting a project and the Sql Server already exists so I will take the approach Database First as an example of that article Entity Framework Tutorial. I’ll create the file .emdx and import the…
-
1
votes1
answer199
viewsSubmit the form within a modal view redirects me to the view page
I have an MVC project. A View Home/Index charges the View Usuarios/Create in the form of a bootstrap modal. However, my <input type="submit" /> redirects me to the view address…
-
1
votes1
answer488
viewsRequests POST AJAX ASP net MVC
Good afternoon, I’m with a small doubt, I’m making a POST request with AJAX on ASP net MVC and it works normal, but in firefox I get an error on the console However, this error does not appear on…
-
1
votes1
answer2136
viewsDownload File on Asp net mvc
I have files that were uploaded to wwwroot/files/ folder of my project. I want to download these files but when I click on the button nothing happens. public ActionResult DownloadFile(string…
-
1
votes1
answer795
viewsHow to enable CORS for web page access from a different domain, in Asp.Net MVC
I am developing an application that is communicating with Secure Pag Checkout through the Web Server url https://ws.sandbox.pagseguro.uol.com.br that is working perfectly, after making the payment…
-
1
votes2
answers401
viewsController Dynamic Fields - ASP.NET MVC
I have this JavaScript that creates new fields for me when I need and that makes the call to create the JSON. This counter within the function adicionarCampos() is necessary for something else…
-
1
votes0
answers57
viewsIs it possible to simulate a C#FTP server?
I need to develop automated integration tests in an application whose features have external dependencies like FTP. I wonder if it is possible to simulate an FTP as well as to simulate a database…
-
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
answer322
viewsSave Image Path to the database and call in View Asp.Net MVC
I’m trying to save the image path in the bank, and then call in the view, but it’s saving the entire physical path. and at the time of calling, does not appear the image. My Controller: public…
asp.net-mvcasked 6 years ago Rafael Passos 527 -
1
votes1
answer645
viewsCreate Dropdownlist with Viewbag
I’m getting the following error: Invalidoperationexception: There is no Viewdata item of type 'Ienumerable' that has the key 'Office'. Here I search from the database: public…
-
1
votes2
answers548
viewsSend object list to View, by Viewbag Asp.net
I’d like to get some data: Class: public class Produto { public Produto() { this.Categoria = new HashSet<Categoria>().ToList(); } #region Atributos [Key] public int ProdutoId { get; set; }…
-
1
votes2
answers43
viewsObject attributes coming null in Query
Would anyone like to tell me why in my query, the attributes of the COR object, are coming null? I make that same appointment for Sizes, and you bring me the result waiting. however, when making the…
-
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
answers87
viewsError 500.19 - Internal Server Error - requestFiltering
I have application that allows to upload with large files. I already went up my site in the hosting, try to navigate the main page and get error: Detailed Error Information: Module…
asp.net-mvcasked 6 years ago Matheus Miranda 5,375 -
1
votes1
answer267
viewsHow to mix parameters within an HTML.Beginform ASP.NET
I got the following Html.BeginForm(Don’t take into account if it’s incorrect is a legacy code and I can’t refactor it now). using (Html.BeginForm("Confirm", "Download", new { ContributorID =…
-
1
votes1
answer60
viewsSending form with Asp net mvc5
Good morning, I have a form to send where the button is outside the form, this form has 50 different fields, I did in html and I need to receive this data via post in a controller c#, but I have no…
-
1
votes1
answer53
viewsRecover Model List Passed by ajax through Formdata
I’m sending an image, along with a model that contains a list of integers. But I’m not recovering the moment you enter Action. I can recover the image, field1 and field2, while the field. HTML…
-
1
votes0
answers62
viewsIgnore Icollection Automapper property does not work
I’m having trouble ignoring one property that’s like Icollection and another that’s like Generic Class. Type I am ignoring in Profile Map Address class, it works only when Map…
-
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
votes2
answers81
viewsError while searching with Entityframework
I’m having a problem with a request, in the controller when I query the products table appears the following message when debugging, I click on an icon and does not return any data, but the table…
-
1
votes1
answer26
viewsMVC Insert text into a label when the button is selected
Prentendo fill a label when I click a button. I created a method, a label and a button. The goal is that when pressing the button, the label is filled with the data I receive. I have practically…
-
1
votes0
answers112
viewsHow to use more than 1 'div Asp-validation-Summary' in the same Razor view?
I have a Razor view that has two different forms, one of Login and the other of User Registration, I built both forms and I inserted as usual the tag with asp-validation-summary <div…
-
1
votes1
answer504
viewsASP NET MVC - "CORS" ERROR
Hello, I have a mistake and I can’t fix it. I have an ASP NET-MVC5 application and I carry a frame in my view that has some fonts, but they are giving the following error: Access to font at…
-
1
votes0
answers46
viewsHow to fill a property (type Object) from a form
I have the following code @model ModelTransaction <div class="form-group"> <label for="name">Conta:</label> <select asp-for="Account" class="form-control"> @{ foreach…
-
1
votes1
answer383
viewsError deserializing Model JSON data
JsonSerializationException: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'SoftluxWebCore.Models.Tabelas.Financeiro.CaixasModel' because the type requires a JSON object (e.g.…
-
1
votes2
answers130
viewsProblems loading cascaded dropdownlist whose field is created dynamically - Asp.net MVC
I’m having trouble loading a DROPDOWNLIST that is dynamically created. When selecting a CONTACT FORM, I need the dropdownlist CONTACT TYPE to be loaded with the related options. The problem is that…
-
1
votes1
answer63
viewsRemove Devextreme text
How can I remove the text and write down the text box in my form ? I need to remove the text Ban nome:, I need only the text box (css is not ready yet)…
-
1
votes0
answers37
viewsSend multiple checkbox via model to Controller
I have a class: public class TreeViewConfigVm { public string plant_selected { get; set; } public List<SelectListItem> criticality { get; set; } public List<SelectListItem>…
-
1
votes1
answer36
viewsModify Displayexpr
I have the following code: groupItems.AddSimpleFor(m => m.Bcx_codigo).CssClass("lbcod") .Editor(e => e.SelectBox().Width("300px") .DataSource(ContaBancariaController.ListaBancosBuscados)…
-
1
votes1
answer33
viewsWhy access to a Session within an Actionfilter is behaving this way
Greeting to all. I am developing an application in Asp.NET MVC5 and found a following problem: The application needs me to log in from any screen it accesses via browser. To decrease the amount of…
-
1
votes1
answer141
viewsReturn json from query Inner Join ASP.NET WEB app C#
Good afternoon, you guys. I’m trying to return the result of a query with INNER JOIN in a C# REST API but I’m not getting it,I can’t use frameworks, it has to be at the base of the code, I’ve…
-
1
votes2
answers290
viewsDoubt in passing parameters via AJAX to ASP NET CORE Action
Friends, I’m having trouble passing a value to the action of a specific controller that takes as parameter an id of type int. AJAX var dataForm = $("#statisticId").val(); $.ajax({ contentType:…
-
1
votes1
answer136
viewsCan static classes and methods be used in ASP.NET MVC without problems between user sessions?
I did a routine of login using cookies and as I’m always looking for this information, so you don’t have to be instantiating everywhere I use I left these static classes, my question is if there…
-
1
votes1
answer259
viewsProblems with closing and opening Modals Bootstrap - Asp.net MVC windows
I created two types of modal windows to dynamically open Partialviews: modalGenerica (open large windows) and modalGenericaPequena (open small windows). When I open the two overlapping windows…
-
1
votes1
answer1981
viewsAutomappermappingexception: 'Error Mapping types. '
Could you help me with this mistake described in the title, please. I am using the Automapper in the same way in other classes and only in those classes is it making this mistake. I couldn’t…
-
1
votes1
answer80
viewsI can’t make a Dropdown change event work - JS and Asp.Net
I have a custom Combobox and inside it a button with menus and submenus. When I click on an element of the tag (For example, an email) it should use the change event and capture the data-id content…
-
1
votes0
answers468
viewsMaximum request size exceeded Httpexception (0x80004005)
I am trying to upload files on my system however I cannot due to error message: Httpexception (0x80004005): Maximum request size exceeded. I’ve tried several solutions and nothing Following the code…
-
1
votes1
answer429
viewsDecoding on Base 64 does not consider "Ç"
I have the following code snippets: window.btoa(CodAcabamento) //Codifica meu código para enviar para a WebApi string CodAcabamentoDes = Base64Decode(CodAcabamento); //Decodifica meu código para…
-
1
votes1
answer243
viewsProblems passing 3 parameters via AJAX request -Asp.net Core MVC
I need to pass 3 parameters to my controller, but the values are not enough: Personal Contact Personal Modelcontact Contact Information: Complex parameter (class with properties); int…
-
1
votes0
answers18
viewsAm I using the Asynchronous Task correctly?
Hello, I am doing a project in ASP.NET MVC and wanted to use an asynchronous task. In my stock I have: public async Task GerarItens(int codigo) { using (var dbTran =…
-
1
votes1
answer1163
viewsProblem with (Sql Server) insufficient system memory in Resource pool
I have a problem in some queries performed by the system, I analyzed the code and there is no error, more the bank is returning me to the message "There is insufficient system memory in Resource…
-
1
votes1
answer418
viewsAvoid simultaneous user access
I need to make the user not log in to the system (asp-net mvc) on different machines. The system is on the intranet and currently there is an Access table with date and time of access of the user…
-
1
votes0
answers62
viewsHow to open the same Modal Bootstrap window (cascaded) several times with different contents?
I am a layman in web programming and I am working with bootstrap modals windows in an Asp.net MVC project. I come from the Desktop world and I confess that I am having difficulties with the…
javascript asp.net-mvc twitter-bootstrap asp.net-core modalasked 5 years, 6 months ago Master JR 1,853 -
1
votes3
answers157
viewsWhy doesn’t View see the javascript file?
How to make the view run the javascript file: novo.js Directory structure: Views > Product > js > new.js Error: View Product.cshtml: @{ ViewBag.Title = "Index"; } <h2>Index</h2>…
-
1
votes0
answers18
viewsProblem adding the Image Directory to the database using ASP.NET
Controller using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using Uploadimagemvc.Models; using System.IO; namespace…