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
-
2
votes1
answer147
viewsAllow Multiple Providers with Authorize Attribute
I’m trying to implement permissioning by Roles within my controller: [PerfilFiltro(Roles = "Administrador,Caixa")] public ActionResult Index() { return View(db.Adicional.ToList()); } public class…
-
2
votes1
answer1587
viewsCreate a fixed header and footer for all pages
How to create a header with the logo and menu, and a footer with some information, and this header and footer are the same for all pages? No CTRL + C / CTRL + V, because if I change any items, I…
-
2
votes1
answer321
viewsSend UTC Datetime Javascript to C#
I have an ASP.Net MVC project as follows: In my view I have a Javascript variable that keeps a date: var hoje = new Date(); In my controller have a action which receives via AJAX the value of the…
javascript c# asp.net-mvc datetime serializationasked 9 years, 2 months ago Jedaias Rodrigues 6,718 -
2
votes2
answers3368
viewsSend email using ASP.NET MVC
How do I send email using ASP.NET MVC? Do you have an option to send without specifying SMTP similar to mail() of PHP?
-
2
votes1
answer94
viewsHow to register a default user at the beginning of the application?
In an ASP.Net MVC application I need to have a default user record and for that I am thinking of adding it on startup of the application. In the archive Global.asax I did the following: public class…
-
2
votes2
answers1135
viewsHow to publish a project in ASP.NET MVC at a specific URL
So I’m in a situation I don’t know how and I don’t even know if it’s possible to do. I have a website in ASP.NET MVC, let’s call it sitedokelvin.com.br, this site is an Asp.net mvc project. And I…
-
2
votes1
answer164
viewsproblem with jQuery ajax
I am facing a problem when using google Charts, where it is working perfectly in Internet Explorer, but when running the same page in google Chrome or firefox, graphics are not shown my action…
jquery asp.net-mvc asp.net-mvc-4 google-chartsasked 9 years, 2 months ago Pablo Tondolo de Vargas 5,444 -
2
votes1
answer77
viewsWhich components should I use for color and photo selection in ASP.NET?
I have an ASP.NET solution using bootstrap for page styling and would like recommendations for two component types: One for colors, returning color code in hexadecimal, for example: ffffff or…
-
2
votes1
answer135
viewsDate with bootstrap does not run in my project
I need to place a component to select dates in a filter in my project. As I use bootstrap, I need to place dates with this component. It turns out the examples I picked up on the internet, I…
-
2
votes2
answers2145
viewsError with System.Web.Webpages.Razor.dll
I tried to install the package install-package microsoft.aspnet.mvc.en for javascript in Portuguese and my application started not running anymore, giving error where everything points out that it…
asp.net-mvcasked 9 years, 2 months ago Kelly Soares 1,181 -
2
votes1
answer337
viewsSite . NET with high performance
I will start building a website to purchase tickets and the access forecast to main page is 8000 users per minute. We must use C# . NET and MVC. The database, design standard, ORM and frameworks are…
-
2
votes1
answer128
viewsImplement Text Approval Flow
I am developing a project where the user can publish texts, but before being posted on the site needs to be approved, something similar to the invitations of friendship of social networks where it…
-
2
votes1
answer163
viewsConfigure Scaffold to generate classes
You can configure Scaffold to generate classes other than the default (Controllers and Views) ?
-
2
votes1
answer135
viewsProblem with Viewbag and Viewdata for Breadcrumb Creation
I need to return from my controller to my project view data to assemble the breadcrumb (structured navigation). My problem is: If I send by Viewbag or Viewdata or Tempdata, and the user is using two…
-
2
votes1
answer76
viewsUse Pattern View Model or a POST method with Json?
I wanted a tip from you who are experienced me. I am developing an application where I will use properties of 2 models, which wanted the best option to be used this case and if possible please list…
-
2
votes2
answers1798
viewsShow current date in Editorfor Razor
People would like to know how to insert the current date into a @Html.Editorfor? I’ve searched a lot of places but so far I’ve got nothing.
asp.net-mvcasked 9 years, 1 month ago Deivid Farias 460 -
2
votes1
answer1754
viewsHow to translate Summary errors Asp . net validation error messages?
I can’t find a file that brings me the error message strings to be translated, the Annotation are well, only those that bring more complex errors, such as Passwords must have at least one Digit…
-
2
votes1
answer1726
viewsHow to pass parameter via button
How do I use text from @Html.TextBox("pesquisa") as parameter in the code below <button id="BtnConsulta" onclick="location.href='@Url.Action("Pesquisa", "Cliente", new { PARAMETRO)'"><i…
-
2
votes1
answer63
viewsDoes Not Record IIS error System.Diagnostics.Xmlwritertracelistener
I did a test project on Github to demonstrate Log working with System.Diagnostics.Xmlwritertracelistener everything works on my machine, but when I play on the server only records information and…
-
2
votes1
answer282
views404 ASP.NET MVC fails when attached file is large
I’m using the plugin jquery.filer to send files to attach files in my form. I chose this because it was a plugin that managed to manipulate it to send the data of the other inputs along with the…
-
2
votes2
answers906
viewsLogoff with database registration and cookie deletion behind Session_end() in Global.asax
I need help with a project I’ve been racking my brain about for two days. I’m using Microsoft C# MVC5 technology and framework 4.5, I also use Entity Framework 6 with Repository Pattern, Unit of…
-
2
votes1
answer346
viewsBillet generation
Hello, I need to generate billets in an application. I’ve never worked with billet generation. Could someone explain to me where to start, what are the first steps, the path of the stones? I gave a…
-
2
votes1
answer372
viewsHow can I return to a Partialview, leaving the data loaded?
I have an MVC system, where the user can make a query of the registrations. For this to happen, I have a View with filters and a PartialView that is updated within the View, displaying the results.…
asp.net-mvcasked 10 years, 1 month ago Giovani 21 -
2
votes1
answer1127
viewsOpen modal popup in another . cshtml file
Arquivopai.cshtml is as follows: <html> <head></head> <body> <!-- Nesta div pretendo abrir minha popup --> <div id="popup"></div> <!-- Com este link…
-
2
votes1
answer652
viewsVisual Studio 2012 MVC 3 - Action button does not work
I didn’t use the visual studio for a few years. Now I tried again and came across a problem. I created a new web project in visual studio 2012, using the ASP.NET MVC 3 Web Application option. I…
asp.net-mvcasked 10 years ago Paulo Luvisoto 907 -
2
votes1
answer330
viewsDoes not redirect to Login Page
To authenticate in my system I am using the attribute [Authorize] I put this code down on Web.Config for when the Code 401 which is related to not authenticating it redirects itself to my login…
-
2
votes1
answer236
viewsHow to use in @Html.Checkbox?
I have the following code: @{ var st = //(minha lógica q retorna bool); } @Html.CheckBox("MeuNome",st,new { id = "MeuID", value = "MeuValor" }) I can’t use the variable st in the second parameter of…
-
2
votes1
answer64
viewsProblem with Html.Partial and Viewbag
I have my following controller: public ActionResult Index2(int Id= 0) { if (Id == 0) { return new HttpStatusCodeResult(HttpStatusCode.BadRequest); } ViewBag.ClienteId = Id; return View(); } public…
asp.net-mvcasked 10 years ago Rod 9,412 -
2
votes1
answer85
viewsWhat is the best alternative to recording data using a 3G connection?
I have the following situation: a header table with the fields: IDJOGO IDMODALIDADE IDUSUARIO VALOR_JOGADO HORA_JOGO And a detail table: IDJOGO NUMERO_JOGO In this case, it would be feasible to…
-
2
votes2
answers1154
viewsUsing distinct with Entity Framework
I have an object with a structure something like this: Date Description I’m thinking a distinct() in the description field because the records are ridiculously repeated. The question is, the…
-
2
votes1
answer39
viewsHow do I disable this notification? "Based on your project, we have identified Extensions you may find helpful"
I have no idea why this started to appear, I imagine it was later an update of Visual Studio, but it annoys me, and keeps appearing even after clicking on "Dont' Show Again". How do I make this…
-
2
votes2
answers57
viewsUsing [Foreignkey(")] - MVC
This is my domain using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using System.Web.Mvc; namespace Dominio { public…
asp.net-mvcasked 10 years ago Rafael Barbosa 2,855 -
2
votes1
answer332
viewsInheritance in Database
I am developing an application, where I have 3 tables that have the same attributes, but as they had attributes in these tables that were mandatory for some, and not for others, I decided to…
-
2
votes2
answers713
viewsHow to instantiate primary key in another MVC class?
I have the class Funcionario and Projeto. They both have their Ids. I want to create a class ProjetoFuncionario and would like to instantiate the primary key of the two in this class. How can I?…
-
2
votes1
answer130
viewsSearch with Checkbox
I am trying to create a search system in my application where the user can search the site publications according to gender. I can list the generos registered with checkbox, but I’m lost to do the…
-
2
votes0
answers784
viewsVisual Studio 2015 - debug stopped working Asp.net mvc
When I hover over a variable when debugging a C# application in Visual, it hangs and keeps showing some messages. I’m running Visual Studio 2015 Community on Windows 8.1 64-bit. Does anyone know…
asp.net-mvcasked 8 years, 10 months ago Harry 3,805 -
2
votes1
answer156
viewsWhat is more advisable? Perform the query through a list or directly in the database?
I have to perform a consultation where I need to do 4 INNER JOIN and still use WHERE in various fields. What is most advisable? Conduct the consultation in this way? using (DbContexto db = new…
-
2
votes1
answer185
viewsDoubt Model Service DDD
I have a question about a project that follows the DDD architecture model. In a service model I need information that is the result of a method from another service, which is the correct way for me…
-
2
votes1
answer54
viewsAsp.net Identity with many request without client actions
I started using Identity in ASP.NET MVC and I realized that the page keeps giving several requests, even without the user performing any action. It seems to me that this is to validate the cookies,…
asp.net-mvcasked 8 years, 10 months ago Uiliam Venerio 21 -
2
votes2
answers1387
viewsList Folders and Subfolders of an FTP with C#
Would anyone know if it is possible, if yes, how to list all folders and subfolders of a FTP? Okay, here’s the idea. I’m listing all the Files and Directories in this FTP, but different from…
-
2
votes2
answers503
viewsGood practices when working with file processing
I have a web application in Asp.Net MVC with C# and received a new requirement where the goal is to read a text file with thousands of lines, each line containing a set of data that will be used to…
-
2
votes1
answer136
viewsAdditional settings for referencing . NET 4.0?
Today when trying to publish a new version of my application, the following error appeared: Error 26 Mixed mode Assembly is built Against version 'v2.0.50727' of the Runtime and cannot be Loaded in…
-
2
votes1
answer505
viewsStoring data for a while
Is there any way using the javascript cookies that I can store information for 3 hours for example ? In my scenario I need to have a warning page, but I don’t need to store these records in a…
-
2
votes2
answers196
viewsDoubt cache Asp.net MVC
I have the following scenario: Public ActionResult ProdutoFornecedor01() { var produtos = _db.Produtos.Include(x => x.Fornecedor).OrderByDescending(x => x.ProdutoId).Where(x =>…
-
2
votes1
answer79
viewsList most frequent items in the database using LINQ
I would like to list on the screen, like a ranking, the most frequent items in the database table through its name, for example: John appears 6 times; Joseph appears 4 times; Mary appears 1 time.…
-
2
votes2
answers3862
viewsDisplay dynamic images using Razor
Hello, I’m having trouble displaying dynamic images using Razor syntax in an Asp.net MVC 5 project. I have the image path stored in a column in the database, named Imagery. Below the code of my…
-
2
votes2
answers2457
viewsSubtract dates and compare with value
I have two dates: DataAcesso and DataAtual of the kind DateTime. I have one more field called TempoAtualizacaoAutomatica typo byte. I need to subtract these dates and compare the result with…
-
2
votes2
answers119
viewsWhat is the name of these parameters in ASP.NET MVC?
What is the name of these parameters between brackets used to restrict some access or define the protocol used, as in the example: [Authorize] and [HttpPost]. Is it possible to create a custom…
-
2
votes1
answer1049
viewsDate Issue in ASP.NET MVC
In my model I have the following field: [Column("sdt_DataReferencia")] [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:yyyy-MM-dd}")] [Display(Name = "Data Referência")]…
-
2
votes1
answer514
viewsASP.NET MVC Post Date Format
I have a form that sends via post the search parameters, but the parameter of type date whenever it arrives in the action the month and day are reversed, for example, I put on the page the date…