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
answer72
viewsTable within the View
I’m placing a table inside the Edit view. View de Edit (Contract) @if (Model.ContratoParcela.Any()) { <table class="table parcela-lista"> @foreach (var parcela in Model.ContratoParcela) {…
-
0
votes1
answer84
viewsUpdating the SQL database in the MVC project
I made a column change in my SQL BD in my ASP.NET MVC project. I changed a column of Cliente_RG (INT) for Cliente_Bairro (String). In SQL the change was OK. In the project, in all tables (think) the…
-
0
votes1
answer83
viewsOpen Graph Facebook
I created the following Open Graph tags to share pages of a website: <meta property="og:type" content="article"> <meta property="og:title" content="Tranzao"> <meta…
-
0
votes1
answer1226
viewsExcess redirection ASP NET MVC
I have a problem in the project, when accessing the default route, returns me the following error. Esta página não está funcionando Redirecionamento em excesso por localhost Tente limpar os cookies.…
-
0
votes3
answers360
viewsReturn View using View Data ASP . NET MVC
I am a beginner in ASP Net and I am in the "studies" phase, I wanted to know why my code is giving attributes errors. I am using a POST method to send the attributes to a VIEW. Here is a picture of…
-
0
votes1
answer38
viewsError while restoring external database from Asp.net mvc application
I’m trying to restore a bank SQL that I created on a provider that does not have the option Webdeploy. And my goal is to boot a database using ASP.NET MVC with EntityFramework. Well, when you put…
-
0
votes1
answer79
viewsCapture Stackoverflowexception
I have a problem with Stackoverflowexception in an application ASP.NET MVC and I can’t find what might be causing it. I installed the Elmah as suggested in another topic on the same problem, but it…
-
0
votes1
answer52
viewsQueuing Problems for Asynchronous Controllers
Hello, I’m having some problems regarding the Asynchronous Controllers, because the queuing of requisitions server keeps being locked to the client during some operation. The routines work exactly,…
-
0
votes1
answer1402
viewsReceiving System.Web.Mvc.Webviewpage<Tmodel>.Model.get returned null
I am getting a null reference error and do not understand why. Follow the error: System.NullReferenceException: 'Referência de objeto não definida para uma instância de um objeto.'…
-
0
votes1
answer338
viewsChanging model value by Jquery and Asp.Net MVC?
I have a model where I have the attribute status, this attribute is a int that define values. In my form I have 2 buttons: gravar e publicar and gravar, each of these buttons would be a value for…
-
0
votes1
answer51
viewsCreate Actionfilter for "Anonymous" login
I looked it up online, but I couldn’t find the answer to what I wanted. I have the simple code below that checks if the user is authenticated or not in my Actionfilter public class FiltroLogin :…
-
0
votes1
answer65
viewsError going through table html with jquery
I have a table HTML and I need to take the values of value='1' data-chkIdProcessamentoDiario='1' data-chkIdRegistro='1' and assign in an array, but the problem is that apparently the each does not…
-
0
votes1
answer149
viewsHow to Recover SQL Server Data Correctly?
I created a CRUD simple using the ASP.NET MVC and I can save my logs normally. If I look in the database, my date (Dating) was stored like this: 2017-06-01 00: 01: 23.750 But when I try edit the…
-
0
votes1
answer100
viewsHow to change and maintain the mapping of classes and properties using ADO.net
When using a database I have tables and columns with names like: - tb_usuario usu_id last name usu_data_nasc - tb_product pro_id pro_name pro_desc_resumida pro_desc_completa When using ADO.NET…
-
0
votes1
answer468
viewsWhat causes the "Unknown Renderer type" error in Google Charts?
Hello, I’m making a program to generate graphics and started to appear this error in some, but the strange thing is, the graphics are generated from some selected checkbox, so when you select a…
-
0
votes1
answer143
viewsFluentnhibernate.cfg.Fluentconfigurationexception.Getobjectdata how to resolve?
I have a site that I use Fluentnhibernate and now I uploaded this site to the provider but when I try to open the site shows me some Exceptions of Fluentnhibernate. This site, on my computer, works…
-
0
votes3
answers764
viewsError In Modelstate Validation
I am wanting to return the validation errors of my model. Only I get an error message when I try to register. System.Linq.Enumerable+Whereenumerableiterator`1[System.Web.Mvc.Modelerrorcollection]…
-
0
votes1
answer283
viewsProblem with ASP.NET Checkbox "The Parameter Conversion from type 'System.String' to type 'System.Boolean' failed."
I’m having the following problem with a checkbox I have a checkbox list that is dynamically loaded (as the items that exist in the bank a checkbox is generated). I currently have only three items…
-
0
votes1
answer89
viewsError while paging using Pagedlist with List<Dinamyc>
I’m trying to make a pagination of a Webgrid using Pagedlist but there is conversion error: Additional information: Cannot convert type implicitly 'Pagedlist.Pagedlist' in…
-
0
votes1
answer2036
viewsPass parameters to the controller via ajax
Guys I don’t know anything about jquery/ajax and wanted to pass a parameter to the controller. I have a modal that opens only to ask if the person is aware of the cancellation where the only field…
-
0
votes1
answer172
viewsError creating a condition in Webgrid’s Html.Raw
I am trying to put a condition in a Webgrid line and the following error occurs: Cannot convert lambda expression to type 'string' because it is not delegate type Even based on this post Variable…
-
0
votes1
answer680
viewsHow to get the Hidden input value inside the controller using Formcollection?
I’m trying to get the value of a Hidden input inside the Controller by Formcollection, but the value is reset. To increase the value, I’m using a Javascript function. HTML: <form…
-
0
votes1
answer1212
viewsASP C# Bootstrap - Open Masterpage modal
I’m learning how to develop websites with ASPX C#, using Bootstrap. Before, I want to say that I’ve researched everything and I haven’t found a solution to the problem I’m encountering, so, please,…
-
0
votes1
answer93
viewsSort by Reflection with Getproperty
I have a generic class with a method that needs to sort a generic object. However, give error saying that does not recognize the Reflection Getproperty method, because lambda can not translate. How…
c# asp.net-mvc entity-framework classification reflectionasked 7 years, 5 months ago LeoFelipe 1,455 -
0
votes2
answers2110
viewsHow to implement the Gentelella Bootstrap Admin theme?
Guys I’m starting now with web development in Visual Studio. I already understood the MVC, I have some knowledge of HTML and I started to study the bootstrap. I discovered on the web this beautiful…
-
0
votes1
answer1157
viewsHow to take the contents of an HTML Table and convert into a C# List<>?
I have a table html which is created dynamically by the user. I need to take all the data entered by him in the table and generate a List to be able to save later in a database. Below are project…
-
0
votes1
answer1006
viewsBootstrap Modal Change and Ajax ASP.NET?
I developed a basic functionality in the Asp.net MVC controller where I have a product list and it is changed in the Back-End and in the front-End I use the Bootstrap-Modal to load the product and…
-
0
votes1
answer51
viewsCalling a text/x-Kendo-template script from a javascript function
I have this new button and event onclick I’m calling the function openEditor(), and within this function I want to call a script of type text/x-kendo-template. How can I do that? My code currently:…
-
0
votes3
answers849
viewsLinkbutton : Open link in a new window (Right Mouse Button)
I wonder if there is any way I can open a new tab by right-clicking, or middle-clicking... I’m using the "LinkButton" but the command occurs within a OnItemCommand="ListaMenu_ItemCommand". Aspx :…
-
0
votes1
answer80
viewsGoogle API Does not appear on my page
Hello, I’m trying to insert the google maps on a website MVC that the Visual Studio 2012 already available for testing. Except for the part of maps and putting into a aspx loose, it generates the…
-
0
votes1
answer156
viewsHow to know if a Json request did not return result?
I have a code in JavaScript who does a search in a database and fills in a input with the patient’s name found: $("#bCns").keypress(function (e) { if (e.which == 13) { var options = {}; options.url…
-
0
votes1
answer523
viewsJavascript redirecttoaction does not work
After a validation I call the controller (Profile) in the action (Add) to add a new record through javascript. If the insertion goes well I give RedirectToAction for the index of this same…
-
0
votes3
answers1868
viewsMask in table values
I am looking for a way to create "Masks" for the values of my table in ASP.NET. Currently, I am displaying the values like this: @model TB_RESUMO_GERAL List<TB_RESUMO_GERAL> rg =…
-
0
votes1
answer1295
viewsInvalidoperationexception: Cannot create a Dbset for 'Applicationuser' because this type is not included in the model for the context
I already have a database created in Sql Server, so I executed command: PM> Scaffold-DbContext "Server=(localdb)\mssqllocaldb;Database=Teste;Trusted_Connection=True;"…
-
0
votes0
answers137
viewsLINQ Dynamic from DTO - Datetime Filtration
I’m trying to assemble a dynamic filter from a Dtofiltro object that I get filled through the View. My problem is, when I try to filter the results that will be shown on the screen by Mesano, I…
-
0
votes1
answer43
viewsError in file . js
Included a . js file in an MVC project. my . js file looks like this: $(document).ready(function() { function escondePanel(painel) { $("#pnPessoal").css("display", "none");…
-
0
votes0
answers73
viewsProblems with the. NET Framework version
I have an ASP.Net MVC 5 and Webapi application, in version . NET 4.5.2 and post them to my FTP server I have the following error (image at the end of the post) And asking for the company’s technical…
-
0
votes1
answer665
viewsAsp.net c# DDD - problem when passing data from Entity to Viewmodel
I am developing an ASP.NET MVC project, with DDD structure and using Simple Injector. I can perform BD persistence normally, however, when retrieving information and displaying it in a list, it…
-
0
votes1
answer344
viewsSame partial view within multiple modal popup
I have a content that is inside a partial view. There are situations where I need to open popup’s that change only buttons and their actions. But the content is always the same as the partial view.…
-
0
votes1
answer51
viewsView error returning a txt file
I’m using the following code in my Controller: public ActionResult geraBpa() { var caminho = System.Web.HttpContext.Current.Server.MapPath("~/Content"); StreamWriter file = new…
-
0
votes0
answers50
viewsIs there a difference in performance between returning an image in the Controller or in the View?
I just learned how to search and display an image from the database. I managed to do it two ways: First: Through an Actionresult in my Controller: public ActionResult RetornaImagemDoBanco(int id) {…
-
0
votes2
answers202
viewstxt file opens in the browser instead of being downloaded
I use the following code to generate a txt file and send it to my View: public ActionResult geraBpa(){ var caminho = System.Web.HttpContext.Current.Server.MapPath("~/Content"); using(StreamWriter…
asp.net-mvcasked 7 years, 3 months ago Italo Rodrigo 4,344 -
0
votes2
answers593
viewsHow to model the products table for an e-commerce?
I have a question about how to model the table Produto of a small e-commerce I’m doing. I have been seeing some e-commerces and came across the following situation: mm same product can have…
-
0
votes1
answer213
viewsRun Modal Open Screen Script in Ajax. C#
Problem: I’m in the Index view, it has a button that opens the Create view on a modal screen, on this modal screen I want to run a javascript code, but for some reason it is not running. I am…
-
0
votes2
answers77
viewsError in the Ienumerable
using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ComponentModel.DataAnnotations; namespace Rotas.Models { public class…
-
0
votes1
answer4931
viewsError "Unable to load file or Assembly"
Any help with the error below? Could not load file or Assembly 'Html5datalist-DESKTOP-P3666CV' or one of its dependencies. The definition of the localized Assembly manifest does not correspond to…
asp.net-mvcasked 7 years, 3 months ago Italo Rodrigo 4,344 -
0
votes2
answers483
viewsHow to take an object property in a Session?
In my Controller, have a ActionResult responsible for logging in the user: [HttpPost] public ActionResult Valida(string pUsuario, string pSenha) { oUsuario = modelOff.usuarios.SingleOrDefault(p…
asp.net-mvcasked 7 years, 2 months ago Italo Rodrigo 4,344 -
0
votes1
answer49
viewsWhat is the best way to save multiple image links in a database?
List<String> _lista = new List<String>(); [HttpPost] [ValidateAntiForgeryToken] public ActionResult Create(Veiculo veiculo, HttpPostedFileBase[] file) { for (int i = 0; i <…
-
0
votes0
answers101
viewsHow to create composite key and ensure the same property in 2 model
I have 3 model public class UnidadeNegocio { public int Id { get; set; } public string Nome { get; set; } } public class Cliente { public int Id { get; set; } public int UnidadeNegocioId { get; set;…
-
0
votes0
answers133
viewserror while doing enable-Migrations in visual studio on a mvc project
I’m trying to connect my project to my local bank. and my connect string is below. <add name="DefaultConnection" connectionString="Data Source=LAPTOP-QEGG9P00;Initial…