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
-
7
votes3
answers190
viewsSeveral tables that should represent a single entity
I am updating a system that has eleven tables that represent a single entity, I believe by implementation error, as an example below: Entidade: Foo Tabela Foo1 - Campo1, Campo2, Campo3 Tabela Foo2 -…
-
7
votes1
answer15160
viewsA potentially dangerous value Request.Form has been detected in the client
I’m having trouble sending this type of input in the input field: &&&&%$&#_(@)(#_!**@#)24 R87R XDHNSIFN 89Q7201784 Dangerous Resquest.Form Error occurs. Error message: Controller…
-
7
votes1
answer266
viewsProblems with IF in javascript
I’m a beginner in Asp.Net MVC, and I’m developing an application that manages Courses and in my screen of enrollment I’m trying to do a validation javascript what case the pupil is already enrolled…
-
7
votes2
answers1503
viewsHow to identify the MVC version?
How can I identify the MVC version I’m using in my project?
-
7
votes1
answer18750
viewsHow to integrate the application with Whatsapp?
I was wondering if it is possible to integrate an application made in C# with Whatsapp?
-
7
votes1
answer3337
viewsSend data to controller via Json
I am trying to send via Ajax some data from my form. In this form, I have fields inputs normal and a list of vendors I previously selected via checkbox. Follow screen: I am creating the JSON object…
-
7
votes2
answers9136
viewsCreate static Selectlist and pass a selected item to the View
I’m having a question about how to send my selectList "status" to my View EditarUsuario. I created my list with the following items: var list = new SelectList(new[] { new{ID="2",Name="Selecione"},…
-
7
votes1
answer104
viewsProblem with . Include() in Entity Framework(Postgres)
I’ve been having a problem with Entityframework, it’s as follows: When I use the ORM(.Include) string to give a Join in tables with foreign keys, it automatically changes the name of the keys in the…
-
7
votes2
answers1872
viewsError: The name 'Viewbag' does not exist in the Current context
Good morning, I have projects using System.Web.MVC na versão 4.0.0.1, worked normally in the 2013 version of Visual Studio, now I’m trying to work with Visual Studio 2015 and my Views no longer…
-
7
votes4
answers2085
viewsDoes the date conversion always remain in en-BR?
I’m trying to convert a date in Asp.Net MVC to yyyy-MM-dd, what happens is that always when I convert and display this date it gets dd/MM/yyyy and I don’t know why it happens. How to solve this?…
-
7
votes1
answer94
viewsUpdate to 2K records <Clients> how to do a single update instead of 2k separately
I have a Customer Model and need to do an update on EnviadoEmailCobranca para 0 I’m doing like this: var clientes = db.Clientes.Where(w => w.Status == 4); foreach (var item in clientes) {…
-
7
votes1
answer265
viewsHow to make ASP.NET MVC skins
How would make skins in MVC? where the client(user) could choose the skin (would change CSS, html, images, etc)? OBS¹: The Skin would be for all pages and each customer can have only 1 single skin.…
-
7
votes1
answer1103
viewsAsp.Net MVC authentication using Formsauthentication
I am implementing authentication in my ASP.NET MVC application. I am using FormsAuthentication for this authentication of each user and for each logged in user 5 Sessions are assigned (Name,…
-
7
votes3
answers190
viewsConsole, Windows Forms or MVC what’s the fastest for heavy loads?
I’m developing a program that will basically have the following cycle: Database query(some milliseconds) For each record will perform the following process: Início | Parse de um XML web (alguns…
-
7
votes1
answer605
viewsHow to login without using the Identity standard?
An update on Api of Facebook made the default login form of Identity stop working. The way I’m doing that stopped working is like this: public void ConfigureAuth(IAppBuilder app) {…
asp.net-mvc asp.net-mvc-5 api facebook asp.net-identityasked 7 years, 7 months ago Renan Carlos 1,594 -
7
votes2
answers1093
viewsReplace empty or blank letter, something like Replace("letters","")
There is a field in the database A1_ZTEL he is varchar(15). This way each user entered record of all forms, with bar, point, comma and letter. Now I need to ride a form and read this field from…
-
7
votes1
answer773
viewsHow to map two LIST properties using the Automapper
Registernewpessoacommand class public class RegisterNewPessoaCommand { public RegisterNewPessoaCommand(PessoaNatureza pessoaNatureza, PessoaFisica pessoaFisica, PessoaJuridica pessoaJuridica,…
-
6
votes2
answers4039
viewsWhy use Bytes instead of Image? What is the best practice?
I would like to know why to use the data type Bytes instead of using one’s own Image. If the SQL Server database has the Image data type, then it should be easier and more practical to enter in mode…
-
6
votes1
answer1265
viewsGood practices for Asp.Net MVC 4 - 5
I need to know how to organize my project in the question of CRUD's in case there is more than one Model in my application. For example, I have the student model and the teacher model. I create a…
-
6
votes1
answer682
viewsHow to produce JSON in the format that Highcharts expects?
I have the following code in C#: Dictionary<string, object> dataResult = new Dictionary<string, object>(); dataResult["data"] = new List<object[]>(); dataResult["name"] = i;…
-
6
votes2
answers1506
viewsCompare date time with a timespan
On Asp mvc 4, I’m doing a query where I find the data where the hours are lower or equal than those entered by the user. That is, I have a dateTime and check with the user input variable (a…
-
6
votes2
answers874
viewsHide different options (actions) for different user profiles
I am in a project where I have 3 different levels of profiles: Administrator, Professor and Coordinator. I already have the login module, registration and such. What happens is that I wanted for…
c# asp.net-mvc asp.net-mvc-5 razor visual-studio-2013asked 10 years, 6 months ago Érik Thiago 2,338 -
6
votes2
answers387
viewsHow to create a View for this Template case?
I’ve been trying to apply the solution to this question (How to pass checkbox list to Actionresult) in a problem I’m having but I’m not getting a positive result. I’m getting an array with several…
-
6
votes2
answers1269
viewsWhich Pattern is used to validate business rule?
I use Repository Patterns for searches,save and delete I wonder where is the best validation of my business... Ex: I need to check if the item is in a contrato of a prestador, and bill him with the…
-
6
votes1
answer776
viewsReplicate/Copy elements from multiple tables
I have the following situation: The user has defined an establishment, where he has filled in data in two tables, and intends to replicate/copy all the same data, changing only the id of the…
-
6
votes2
answers605
viewsWhat better way to organize and work with ASP.NET MVC routes?
What better way to organize and work with ASP.NET MVC routes? While we have 1, 2 routes, it’s quiet, but when do we have 500 ? 600 ? In an enterprise application there are many routes, which is the…
-
6
votes2
answers83
viewsResponsibilities of the View
Throughout the internet, I find posts warning about the responsibility of View that should only take care of its name and display the content. Although MVC is based on exactly the distribution of…
-
6
votes2
answers2534
viewsRendering Partials in ASP.NET MVC
I’m having a problem in my application where I wanted to use partial to render one page inside another. That is, one controller within another. Only, what happens is the partial does not render at…
-
6
votes3
answers1183
viewsHow to Dropdown ASP NET MVC
I have a DTO class [Serializable] public class PerfilDTO { public int Codigo { get; set; } public string Descricao { get; set; } public SituacaoEnum Situacao { get; set; } public…
-
6
votes2
answers429
viewsHow to filter a list asynchronously using LINQ?
Example of code without the use of async: var products = db.Products.Where(_ => _.UserId == currentUserId); How do I make this asynchronous query taking into account that the Where of Linq does…
-
6
votes1
answer913
viewsCorrect Statement Classes Model MVC Ninject
I started using OO a short time and in all projects I see on the net, I see the following way of statement. public class Trabalhador { public int Id { get; set; } public string Nome { get; set; }…
-
6
votes3
answers1328
viewsReturns Json of object in C# with Entity Framework
I’m having a problem returning a Json using Entity Framework. The code I’m using is: [AcceptVerbs(HttpVerbs.Get)] public JsonResult Item(int agendaHorarioID) { using (var db = new ERPContext()) {…
-
6
votes3
answers2635
viewsHow to put my ASP.NET site online
I’m trying to put my ASP.NET application on the air, and I’ve never had contact with it, I need to turn my . CSHTML into . HTML? Or something like?
asp.net-mvcasked 10 years, 1 month ago Danilo Oliveira 603 -
6
votes1
answer7747
viewsHow to resolve the medium trust issue in Asp.net
I’m developing a website on Asp.Net MVC5. When posting the site on Locaweb and trying to log in with my user I received the message: Attempt by security transparent method…
c# asp.net-mvc asp.net asp.net-mvc-5 asp.net-identityasked 10 years, 5 months ago Renatto Machado 715 -
6
votes1
answer2742
viewsWorking with Currency (decimal)
I’m working on a project where I had the need to use decimal for field Currency. As the American standard and different from the Brazilian soon had some difficulties. I found some examples of how to…
-
6
votes3
answers3565
viewsUse ajax with Actionlink
I want to change the ActionLink and the URL to work with Ajax, but I don’t know how to do it. Follow my code with ActionLink and URL. <ul class="nav" id="side-menu"> <li> <a…
-
6
votes4
answers3066
viewsHow to make a Hello World on ASP.NET MVC?
I already program but I’m starting with C# and ASP.NET MVC. I wanted to do a program Hello World and gradually add things as I’ve always done with any language I’ve learned. I thought creating a…
-
6
votes3
answers1799
viewsWhat a difference between Dropdownlistfor and Dropdownlist
What a difference between Dropdownlistfor and Dropdownlist? And when and which to use?
-
6
votes4
answers6579
viewsResize image
Well my system has an area where the user registers information about the site. So register images. The system does not restrict image size. Then on the site are presented the images. However there…
-
6
votes2
answers1410
viewsFile upload does not work on Locaweb hosting
Locally I can upload the file and save quietly in a folder using the following code Controller: public ActionResult CriarProduto(FormCollection form, HttpPostedFileBase file) { Produto produto = new…
-
6
votes2
answers328
viewsShow white space for Null value in Views
When I send some value null for my view, and Razor tries to render the value, is returned a Exception. There is a way when the view receive a value null, render this as a blank space without having…
-
6
votes1
answer125
viewsWhat are the risks of putting an ASP.NET application in an environment with Load Balancing?
Regarding the code... there is some risk that may affect my application from the moment it works in a Load Balancing scenario?
-
6
votes2
answers1442
viewsIs it possible to get some value from the browser that identifies the user’s machine?
Problem I am searching for some way to identify and validate workstations, and would like to get some value from the machine that is not changeable, such as the IP that can change. I tried to get…
-
6
votes1
answer276
viewsWhat is the assignment in Action parameter method for?
I had a question regarding some codes I found in a project of a former employee of the company. It is a code that contains assignment in the parameters of the variables. Below follows an example:…
-
6
votes3
answers780
viewsIs it feasible to change databases in an existing system?
I’m starting a project in ASP.NET MVC 5 with Entity Framework for a customer, where the customer has chosen to use a free database, in this case the Mysql. However, with the growth of the…
mysql asp.net-mvc entity-framework software-architectureasked 10 years, 2 months ago Erico Souza 2,188 -
6
votes3
answers1195
viewsEntity Framework many relationship x many extra field
Good morning, I’m studying the Entity Framework Code First and I’m wondering how I should create an Nxn model with extra information in the relationship table. For example: Let’s assume the…
-
6
votes2
answers786
viewsModal display when submitting a form
How do I display a modal when I submit a registration form? The content of this modal will be just a message. Here’s the thing, on this form, you send a file and some information. As it usually…
javascript jquery asp.net-mvc asp.net asp.net-mvc-5asked 9 years, 3 months ago Leomar de Souza 1,074 -
6
votes1
answer214
viewsSystem.Web.Resources.dll not found
We have a mvc3/dotnet4 project, which consumes DCOM servers (c++) through Intertops. Both DCOM (c++) and mvc3 (c#) servers were compiled with visual studio 2013. The projects were migrated to visual…
-
6
votes1
answer858
viewsWhat are controller actions?
In that reply the Gypsy says This (example) is good when you have several Actions in the Controller What are the Actions of a Controller? Note: I would like some example of code as well, defining a…
-
6
votes1
answer671
viewsError after performing an action redirect to a page
I believe I am going wrong the code below, it should after saving the Client and redirect to Client/Index page, but after saving is on the same page, using Debug it passes in Client/Index(Action and…