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
votes0
answers33
viewsJscripts work in one view but not in others!
In my project I have a view "Index" where I use the following script: <script>$('#search').focus();</script> Works normally on this view "Index", but if within this view I have a table…
-
0
votes5
answers870
viewsDoubt with foreach com group by Asp.net mvc
I have an appointment with a group. public List<TB_POSSIBILIDADE> ListarTodos(int id) { var strQuery = ""; strQuery += " select "; strQuery += " a.IDPOSSIBILIDADE,"; strQuery += "…
-
0
votes1
answer163
viewsDoubt with if inside a Partial View Asp.net mvc
In my view I have: @if (Model.Count() > 0) { foreach (var item in Model) { @Html.Partial("_FormularioPossibilidade", item) } } In Partial: @if (@Html.Displayfor(c => Model.DESCRICAO03) !=…
asp.net-mvcasked 8 years, 3 months ago Harry 3,805 -
0
votes2
answers565
viewsDoubt with using jquery.maskMoney with Asp.net mvc
I’m using it to form a value , but it’s not working, I have my partial view, this way: _Formularypossibility.cshtml @model Generico.Dominio.TB_POSSIBILIDADE <script type="text/javascript">…
-
0
votes0
answers70
viewsEntity Framework 6: Error saving - Instances of Ientitychangetracker
Domain public class Agenda { public int Id { get; set; } public DateTime Data { get; set; } public string HoraInicial { get; set; } public string HoraFinal { get; set; } public string Local { get;…
-
0
votes1
answer121
viewsException error when authenticating login with null values - Simplemembership - ASPNET MVC
I developed a project on Asp.net mvc5 of a course I’m doing, which is accusing the following error of exception when authenticating the login menu when I enter no data in the form fields and step…
-
0
votes2
answers608
views@font-face c# MVC Bootstrap
I have a Bootstrap template that I’m trying to apply to a project, but I have a huge difficulty importing the . eot, . svg. ttf, . Woff, . otf These files are in the directory:…
-
0
votes1
answer4054
viewsCall View in another ASP.NET MVC Controller
I have 2 Controllers Homecontroller and User controller inside User controller I have a method that validates the user. If it’s valid, I want it redirected to the page Index of Homecontroller But…
-
0
votes1
answer82
viewsView Field when Selecting Dropdownlist and save
I have the following scenario: in a form I have a field called Carga-Horaria, which is a Dropdownlist with a list of hourly loads. In this drop an option called another. When selected the option…
-
0
votes1
answer52
viewsView model with Icollection
I’m starting in mobile development and I’m doing a category control system. Where I give possibility to do various levels of categories. My entity was as follows: public int CategoriaId { get; set;…
asp.net-mvcasked 8 years, 3 months ago Renan Rodrigues 3,709 -
0
votes2
answers943
viewsSend to filled model controller
I have on my main page two partial views, each with a specific view model associated, where all fields of the screen are mounted through Razor, as an example below: <div class="row"> <div…
-
0
votes1
answer363
viewsNull parameters in the controller when sending post via ajax
I am refactoring an ASP.NET MVC application written by another developer. My intention is to remove the use of FormCollection. Before the controller method signature was the following: public…
-
0
votes1
answer521
viewsMVC5 - Refresh partial view in ajaxStop
Hello, Within my main layout page (_Layout), I address a partial view that is responsible for displaying messages that have been added by the controlled, through the Toastr javascript library. Code…
-
0
votes1
answer1752
viewsPerforming the Submit Form using C#
There is the following HTML login form <form action="/Home/Login?ReturnUrl=%2f" method="post"> <input name="__RequestVerificationToken" type="hidden"…
-
0
votes1
answer406
viewsViewbag for all Asp.Net MVC C#controllers
I have an application in ASP.Net MVC, after the user login need to show his name at the top of the page always, regardless of which page he is. This application is an administrative where will be…
-
0
votes1
answer60
viewsList reservations by Administrator
I am trying to list my bookings by different administrators. However, as I did, it lists all bookings. That’s the method I’m using: public ActionResult Index() { Administrador administrador =…
-
0
votes2
answers41
viewsAction that returns Partialview is not being called
I need to present a list of results according to the form below, but the research is not presenting the result. To action in controller is not being triggered. @using (Html.BeginForm()) { <div…
-
0
votes1
answer669
viewsHow do my ASP.Net MVC project view folders with images?
I have a question, I have a folder with images included in my ASP.NET MVC project, but when my project is running it does not map this folder so it cannot include images to my site. I have the…
-
0
votes0
answers971
viewsASP.NET MVC Reports in PDF and EXCEL
Good afternoon, you guys, I would like to get references on better tools to generate reports in an MVC application that allows me to export the result to PDF and EXCEL. Currently, I am creating a…
-
0
votes1
answer115
viewsHow to Interact from Web Application to Client Machines
I have a web application on ASP.NET MVC which is an intranet project. I would like to add some features to it to make it easier to work with Backup’s. I already have one WIDNOWSFORMS APPLICATION…
-
0
votes1
answer341
viewsHow to concatenate a list of an object into a property of another object?
I have the following model: public class Usuario { public int idUsuario { get; set; } public string Nome { get; set; } public string Email { get; set; } public string Senha { get; set; } public int…
-
0
votes1
answer1213
viewsChange date format on C# / Asp.NET server
I’m having a very boring problem, I’m picking one up DataDeCadastro of the server on DateTime when the date well it is in the United States version ("dd/MM/yyyy") I use the .ToString() to format the…
-
0
votes1
answer807
viewsCreation of a Shopping Cart
I want to create a Cart, where you have the Products that I will sell, the quantity and the total value. Does anyone have an idea of how I can start development? Just for clarification, follow my…
-
0
votes1
answer93
viewsDisplay value of an object item using Javascript
I’m a beginner in Javascript, I don’t know how to display the value qtdeEstoque of listaTamanhos. Can someone help me? alert("Tamanho: " + lista.Value + " / Estoque: " + data[i].qtdeEstoque);…
-
0
votes1
answer55
viewsSearch in visual studio
I’m making a web project in the basic visual as I do so I can filter a code of type int and only show the clients with the code typed? using System; using System.Collections.Generic; using…
asp.net-mvcasked 8 years, 1 month ago Vinicius Hissamitsu 1 -
0
votes1
answer202
viewsHow to use Remote Validation correctly?
I’m trying to use the Remote Validation to check if the email is already registered, the problem is that whenever I inform an email for example [email protected] does not return that the email…
asp.net-mvcasked 8 years, 1 month ago FernandoPaiva 1,562 -
0
votes1
answer60
viewsDoubt with customization of routes Asp.net mvc
I am studying about routes, I have a list and I want to show the name of the product in the url. The way it is shows only the name of the Category. Thanks public class Produto { public int ProdutoId…
asp.net-mvcasked 8 years, 1 month ago Harry 3,805 -
0
votes0
answers71
viewsHow popular is Reportdatasource() object in a webform.aspx?
As an example below follows the example of the Entity, Interface, Repositorio and the Controller of the MVC system. In sequence the code of a formulário webform.aspx what use to display the Pedido…
-
0
votes0
answers60
viewsHow to make a screen in Asp.net MVC, which lists the ID’s of the same table
Well I have little programming experience so I need help with that. I have a table called Person, and a table to create the relationship between herself that is called Personal, relationship 1 for…
-
0
votes1
answer472
viewsHow to add/remove items within the Cart
I would like to make a simple Cart, where I used as a base some explanations here inside the same Stack. It follows below my Cart Controller: public class CarrinhoController : Controller { private…
-
0
votes1
answer463
viewsPost to an external url
They put me on a project that was done in ASP. NET MVC 2 and need to be done the integration with Itaú Shopline, I downloaded the dll from Itaú, I did all the encryption procedures, I can generate…
-
0
votes1
answer123
viewsNavbar in trouble
I’m doing a project, and when I reduce the screen, the navbar switches to the mobile default, making it responsive, then when I click on the 3 dashes of the navbar menu, it drops the content and…
-
0
votes0
answers47
viewsList data in a Dropdown related to the result of another Dropdown
I’m rephrasing that question, because it must not have been very clear. What I want is this: Choose a restaurant at Dropdown, and the next dropdown, list the times that were registered by that…
-
0
votes1
answer121
viewsHow to validate a Ienumerable property using Dataannotations?
I have a IEnumerable<long> selectedItems he is to display a select to select multiple values, I want to validate this IEnumerable using the DataAnnotations to check if it is empty because it…
-
0
votes1
answer1580
viewsReturn the data to the View using Json.net or javascript-Asp.net mvc
I need to return the data to fill in a script, public JsonResult BuscaImagens() { List<Object> resultado = new List<object>(); resultado.Add(new { IdImagem = 1, URL =…
-
0
votes1
answer347
viewsReturn to View two tables using Homeviewmodel?
I have the next situation, in my Models folder, I have: public class HomeViewModel { public HomeViewModel() { // apenas para garantir que NUNCA seja nulo! Facilica código na view PreviewImages = new…
asp.net-mvcasked 8 years, 1 month ago Harry 3,805 -
0
votes1
answer544
viewsHow to reference an image <img> tag
I’m studying Asp.Net MVC and I’m having trouble defining the tag URL HTML: <!-- menu profile quick info --> <div class="profile"> <div class="profile_pic"> <img…
-
0
votes1
answer60
viewsWeb Api Asp.net mvc has any data limit reported on Route?
I have a web api, I’m trying to do an insertion in a user register, but I noticed that the number of parameters has a limit. If I try to add one more parameter it generates an error: [HttpPost]…
asp.net-mvcasked 8 years ago Harry 3,805 -
0
votes1
answer342
viewsbring html code from the bank
I have the following question, I know I am not doing it the right way, but I believe it will serve me. I’m trying to integrate my College project with Pagseguro, but I’m finding it complex to use…
asp.net-mvcasked 8 years ago Fabio Souza 1,859 -
0
votes0
answers28
viewsAdd a Dropdownlistfor with the result of Jquery Asp.net mvc
I want to know how to do this in the friendliest way possible. I have an Actionresult public ActionResult IncluirProspecto() { //retorna o cadastro classificação do prospecto var…
-
0
votes1
answer79
viewsHow to make a grouping in View Asp.net mv
I have a consultation with grouping with the following result: In my Controller I have : // GET public ActionResult Index() { //lista var tbuscar = new GaleriaVideoAplicacao(); var listar =…
asp.net-mvcasked 8 years ago Harry 3,805 -
0
votes1
answer637
viewsfilter table Asp.net mvc
I need to filter a table, which is in a partial view, depending on the parameter typed in a field, which is passed to the controller via ajax. How to reload the table with the filter applied? Part…
-
0
votes0
answers267
viewsImage over another as a stamp using css
I have an image on the screen where I want to add a stamp, the problem is that as this image is inside a foreach, so if I get the image id, will this repeated. #carimbo-foto{ position:absolute;…
-
0
votes1
answer454
viewsExport List to Excel
I have a list and would like to export to Excel, in this code this bringing the records correctly, just do not export the file. I need to add something else or I’d have another way? CorpDAO dao =…
-
0
votes1
answer392
viewsHow to define the image format when saving the file using "html2canvas"?
I am using canvas2image.js to turn a div into an image, everything works, the problem, need to define a format for the image at the time of saving, without it it is without a valid format. Example:…
-
0
votes2
answers366
viewsIntegration going into loop
I’m trying to integrate Pagseguro to my application, but I’m encountering huge difficulties, as there are numerous detailed information that I find ahead, leaving me more and more confused. I have…
asp.net-mvcasked 8 years ago Fabio Souza 1,859 -
0
votes1
answer224
viewsError updating Record with EF
I’m having a hard time updating a record, using Ef. Relationship key conflict error. As if I’ve been trying to add and not update. Additional information: A referential Integrity Constraint…
-
0
votes1
answer26
viewsError accessing array indices inside a LINQ expression
I am doing a query to search all weather with a certain date, but when executing occurs the following error: An exception of type 'System.NotSupportedException' occurred in…
-
0
votes1
answer150
viewsConnection string for different logged in users
I am doing a job and I came up with a possibility that I would like to know if it is possible to realize: the purpose of this idea is to alternate a certain connection string as per the user logged…
-
0
votes2
answers1736
viewsPartial View does not load Javascript - Asp.Net MVC
I’m switching to a Partial View via a two-parameter controller, music and artist. Already in PV I pass to the function fetchLetra() that is in the file letraAPI.js these parameters for the return of…