Most voted "asp.net-mvc-4" questions
ASP.NET MVC 4 is the fourth version of the Model-View-Controller ASP.NET platform for web applications.
Learn more…135 questions
Sort by count of
-
1
votes1
answer678
viewsValidation for Textarea using Razor MVC 4
I have the following modal and need to include validations so that the textarea is mandatory when clicking the "Yes" button, that is, it cannot be sent in white, and so that the textarea has at…
-
1
votes1
answer200
viewsDropdownlist filled and selected
I need to fill in a @Html.Dropdownlist() with my Model parameters and pre-select one of the items. At Model I am receiving the complete package, being: List of products on Produto and the items…
-
1
votes2
answers161
viewsOracle DB and MVC 4 showing ORA-06413 error
I’m having a problem very similar to this one. To summarize, I have an application that runs with ASP.NET MVC 4, using . NET Framework 4.0, using the same DLL of access to Oracle,…
-
0
votes1
answer122
viewsSave to Database at auction end
I am developing an auction site on ASP.NET MVC4 and EF, at this time already makes bids and has a time stopwatch. The problem now is: how do I record the data when the time runs out? I’ve thought…
-
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
votes2
answers1007
viewsData validation with mvc Asp.net (edition)
I have a user registration where I use remote validation in the date Annotation to check if the user being registered already exists, my problem is in editing, as I am changing and using the same…
-
0
votes1
answer15042
viewsObject reference not defined for an object instance. in an object declaration
There is an error in my code only when I publish, when debugging works normally. the error is as follows: "Undefined object reference for an object instance." my code: MkfFile file = new MkfFile();…
-
0
votes2
answers1799
viewsjQuery Mask Plugin does not format the number properly
I am working on a MVC4 project, the mask works correctly when saved, but when returning the database data the plugin shows incorrect data if the value ends in 0. Data example: 99.000,00, when I go…
-
0
votes2
answers294
viewsRequest ajax accessing already included scripts
Eae guys, I have a view that renders a partial view. Index.cshtml <script type="text/javascript" src="~/Scripts/jquery-2.1.1.js"></script> <div class="tab-control"…
-
0
votes1
answer127
viewsProblem displaying image
As I display an image recorded in the database, I believe that it is not actually recorded, because I can only see the name/format of the image. In this case, how do I display this image? I looked…
-
0
votes0
answers13
viewsDo I need to open an aspx in a mvc4 project is possible?
I have a MVC4 project, and I need to open an aspx page, which is a report from Report Viewer. This works by running locally with Visual Studio’s IIS, but going up to the server doesn’t work. What…
-
0
votes1
answer562
viewsDoubt with View Tipada?
I got the following: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using PostGetModel.Models; namespace PostGetModel.Controllers { public…
-
0
votes0
answers170
viewsDoubt in the implementation of Rotary in Asp net mvc 4
I have a problem with rotary for PDF generation, where I am putting a color image but when generating the report it appears in black and white and not colored as it should appear. Is there a…
asp.net-mvc-4asked 9 years, 4 months ago Eduardo Mendonça Braga 1 -
0
votes1
answer279
viewsHow do I check the browser type, version and if support Javascript?
I need to identify the browser, the browser version and if it is enabled to run javascript. In previous versions of Asp.Net I checked Global.asax using the command Request.Browser.JavaScriptbut this…
-
0
votes1
answer101
viewsDynamic column with value appearing wrong in Webgrid
I have a problem when creating a table with dynamic columns. I add the columns in a loop this way: for (int i = 0; i < attrIds.Count; i++) { resource_attr attr =…
-
0
votes2
answers475
viewsIs it possible to run ASP.NET MVC without IIS?
It is possible to run an ASP.NET MVC application without IIS? I wanted the user to be able to run this ASP.NET MVC application without having to configure IIS, I found this link, but I didn’t…
-
0
votes1
answer121
viewsHow to pass variables from C# MVC 4 to SASS SCSS?
I need to change my CSS files dynamically by pulling some data ,like colors, from the database. I chose to use SASS in the application, but I can import an application variable in MVC 4 to my SCSS…
-
0
votes1
answer190
viewsShow content in textboxfor
I would like to know how to display the value of a property within a textboxfor. I have the following code: @model Calcular.Models.Conta @{ ViewBag.Title = "Somar"; } <h2>Somar</h2>…
-
0
votes0
answers248
viewsExit the modal after return of the result
After deleting and returning to index... [HttpPost] [ActionName("Delete")] public ActionResult DeleteConfirmed(int id) { _unitOfWork.UserRepository.Remove(id); _unitOfWork.Salva(); return…
-
0
votes0
answers126
viewsInfinite Scroll in ASP.NET MVC and SEO
Guys, I need to make one Infinite scroll in ASP.NET MVC, but I need to separate the content on demand as suggested by the blog Webmaster Central Blog, so that the Google robot can index my products.…
-
0
votes0
answers97
viewsRecords in Icollection<> navigation property are not being recorded
I’m trying to make an inclusion of items in a list property but I’m not able to include the records in the database. First I have the following class models: public class Frota { public Frota() {…
c# asp.net-mvc entity-framework entity-framework-6 asp.net-mvc-4asked 9 years, 3 months ago JamesTK 901 -
0
votes2
answers339
viewsCustomize an item within css for a particular view
I have this view on MVC View @model XXX @{ } <link href="/eTeste/Content/AbaDetailsODM.css" rel="stylesheet" type="text/css" /> <div id="consoleAbaDetalhes"></div> <div…
-
0
votes1
answer401
viewsMVC error 404 POST method
This is my controller: [HttpPost] public ActionResult TestePost(int id1) { ViewData["Teste"] = "O método POST funcionou, você digitou: " + id; return View("Index"); } [HttpGet] public ActionResult…
-
0
votes1
answer44
viewsThe Parameter Conversion from type 'System.String' to type 'Ramalaguia.Models.Sector' failed because no type converter can Convert between These types
During the realization of a project I came across the following error: System.Invalidoperationexception: The Parameter Conversion from type 'System.String' to type 'Ramalaguia.Models.Sector' failed…
asp.net-mvc-4asked 8 years, 9 months ago Felipe Renan 60 -
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
answer296
viewsHow to create a dynamic @Html.Actionlink with Jquery?
I’m trying to create a @Html.ActionLink dynamic with Jquery but I’m not getting, how to do it ? $('#tableView > tbody').empty(); if (data["CategoriaProduto"].length > 0) {…
-
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
answers70
viewsJavascript for each record in my view
I have a VIEW where I display a table with 15 records (15 rows) and 5 columns, but what really matters is a column, "Actions". In it I have 1 button, "Visualize", that when clicking, I want to open…
-
0
votes1
answer601
viewsCannot implicitly Convert type list to an Object
Good night, I’m doubting the following mistake: Cannot implicitly Convert type 'System.Collections.Generic.List' to 'ITCore.FlowCredit.Business.Entities.ProdutoAmortizacaoCreditoDiasSearch' The…
-
0
votes1
answer2004
viewsCall Action via javascript
Good afternoon, I need help with a problem until simple, but it’s knocking me down. I need to call a controller method and pass two parameters to it, I did something, but it’s not working, someone…
-
0
votes2
answers978
viewsList<Model> Actionresult() MVC
Guys, I need you to help me figure out where I’m going wrong and how to fix a little problem. I don’t know much about MVC, but I’m turning around here. I need to pass a Model class as a parameter to…
-
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
votes1
answer61
viewsIt is possible to generate routes dynamically in ASP.NET MVC4
I am fixing some URL’s of my site and need to create several different routes for each page, for example: routes.MapRoute( name: "ComoVenderMinhasImagens", url: "como-vender-minhas-imagens",…
-
0
votes1
answer2001
viewsObject cannot be converted to dbnull in other types
Good afternoon gentlemen. I am making a user registration in the college work and when logging in this error appears. How can I solve? private Usuario Mapear(DataRow registro) { var usuario = new…
c# asp.net-mvc asp.net-mvc-5 asp.net-web-api asp.net-mvc-4asked 6 years, 5 months ago Vinicius Marson 63 -
0
votes0
answers59
viewsUnit Test C# best practice
I have a test code for a method until quite simple to check. public bool EmPeriodoDeExigencia(ParametroProrrogacao parametroProrrogacao, Requerimento requerimento) { PreCondicao .Para("Determinar o…