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
answer1214
viewsPermissions of users
I do not know how I can be implementing in my systems the permissions of users and I would like you to give me some north. From my own class: public class Loja_Usuarios { public int ID { get; set; }…
-
2
votes1
answer269
viewsWeb Forms for MVC 5
I joined a company, where we have an application running in Web Forms, and we are developing new applications with Asp.Net MVC. However, I was asked to complement an application with Web Forms,…
-
2
votes2
answers1351
viewsPrint queries
I have a view in my application in Asp.net mvc that allows the user to perform a search, which returns the name and data of that search. I wish I could print this search result. How do I print div…
asp.net-mvcasked 10 years, 5 months ago PFVictor 345 -
2
votes1
answer1628
viewsInputmask for Displayfor
I use jQuery Inputmask to add masks to my Textbox. However, I need to add a mask when listing these fields( phone, Cpf, etc). I use Displayfor to list, but the mask does not work with the same. Code…
-
2
votes1
answer286
viewsChange DIV style according to FORM
I have the following application to login public ActionResult Logar(String Login, String Senha) { var bdUsuario = ClientesAplicacaoConstrutor.ClientesAplicacaoEF(); var usuario =…
-
2
votes1
answer2846
viewsError: Could not load file or Assembly 'Dotnetopenauth.Aspnet' or one of its dependencies
I’m having this error running the application: Could not load file or Assembly 'Dotnetopenauth.Aspnet' or one of its dependencies. The parameter is incorrect. (Exception from HRESULT: 0x80070057…
-
2
votes1
answer735
viewsRegularexpression only letters in the Model
Using the following Regularexpression in the Model: [RegularExpression(@"^\d+$")] public int ano_da_configuracao { get; set; } I get the following result: I tried as follows to accept only letters:…
-
2
votes1
answer141
viewsUsing Ipagedlist with multiple results
I am using Ipagedlist to list results in my application. But I’m trying to solve a problem: When I get a lot of results, going to the controller function to read the results from another page gets…
-
2
votes3
answers4590
viewsHow to create dropdownlist Razor in . net mvc via ajax?
I would like to dynamically load my dropdownlist without submitting the page! my project is in architecture . net mvc ! @Html.Label("Categoria do Veiculo: ") @Html.DropDownListFor(v =>…
-
2
votes2
answers1232
viewsImport Itaucripto DLL into VB
Hello, I’m implementing the second way of boleto Itaú, but I’m trying to work with ASP.NET VB and I don’t have much knowledge in this language. I did everything right and is working locally, but…
-
2
votes1
answer163
viewsDoubt filter with Line, ASP NET MVC
I have a question on a filter using Linq, I have a critical object Inside criticism has a ienumerable I need to return a list of criticisms that the status of the last critical move equals 2 But the…
-
2
votes1
answer630
viewsAsp.net MVC class structure
Hello, I’ve been studying for a while asp.net mvc, and developing small projects, evolving and gaining knowledge every day more. One question I have, and I didn’t find much subject on the internet,…
-
2
votes1
answer273
viewsExchange Entity Framework EDMX for Code First
I have an EF5 application using EDMX modeling and I have much more experience and affinity with Code First. Does anyone have any idea/tutorial on how to migrate from EDMX to Code First without…
-
2
votes3
answers2872
viewsHow to Set a Larger Size for a Textboxfor
I’m using the class form-control of Boostrap, and I’d like to have a Textboxfor with a bigger size, how can I do this ? <div class="form-horizontal"> <div class="row"> <div…
asp.net-mvcasked 9 years, 8 months ago Diego Dias 43 -
2
votes1
answer1511
viewsComposite primary key with entities in the Entity Framework
I need to make a composite primary key relation in the Entity framework using the entities themselves. public class ProjetoDocumento { public Projeto Projeto { get; set; } public Documento Documento…
-
2
votes1
answer314
viewsHow to add items from a IENUMERABLE in . Net MVC into a Jquery array?
How do I add items from a IEnumerable<T> in an array JavaScript? View: @using Colecao.ViewModels @model ConfiguracoesViewModel @foreach (var equipamento in @Model.Equipamentos) { //Gostaria de…
-
2
votes1
answer148
viewsTesting of variable content
Using ASP.Net MVC and Angularjs I tested the contents of a view thus: $scope.estado.ldRedeBasica = @(Model.ldRedeBasica == null ? "[]" : Html.Raw(Model.ldRedeBasica)); Only it returned the following…
-
2
votes1
answer552
viewsRequired Errormessage dynamic content
Using Asp.Net MVC 5 need to create a required message with the following format: "Required field! [Social Reason]" Normally I would do so: [Required(ErrorMessage = "Campo de preenchimento…
-
2
votes1
answer108
viewsValidations in Webpapi
I’m starting to study webapi with knockout, using a classe Basic as example I made my model, in the knockout I made the list and include it in my classe I have decorated the attributes with some…
-
2
votes4
answers357
viewsObjectcache to provide a variable for all users
I have an application in ASP.NET and would like to cache for all users as if the variable was in pool application and everyone had access, something other than the session that makes the section…
-
2
votes1
answer65
viewsCan the Entity Framework not map a table in the MVC occur?
I added a new table in Model.edmx, but it was not created in Model.Context.Cs the public DbSet<informacoes> informacoes { get; set; } is also not created in Model.tt the class of this table.…
-
2
votes1
answer111
viewsAppcache in Asp.net MVC
I need to use the Html5 appcache to store some web pages. Before using MVC I simply did this regular expression to check if you are connected or not. var offlinePages =…
-
2
votes1
answer526
viewsIqueryable select data from multiple tables
I have a queryable (Linq to entities) in the Entityframework and I’m not able to pull data from two or more tables. For example: var model = _service.List().Where(m =>…
-
2
votes1
answer3348
viewsPDF reading . NET
I have been researching for a long time a way to read a pdf document that contains Sinapi Inputs tables and save the data in my database, and I do not do the least how to, someone could give a hint?…
-
2
votes1
answer6706
viewsLogin system in Asp.net mvc
How do I implement a login system in an Asp.net MVC application. Do I use Forms Authentication or Identity? I’ve been reading about Identity and wanted to see a basic example of Identity using the…
-
2
votes1
answer123
viewsDecrease in a field of table Asp.net MVC
I am developing course manager in Asp.net MVC, and in the course table has a field qty vacancies. I wonder how I do to make one Count-- (or some other way to Decrease) this field. For example: In…
-
2
votes2
answers2419
viewsQuery with related data in the Entity Framework
I am trying to bring data of the materials with the data of your relationships with the Unit and TD tables, but this code below does not return anything, if I do without Include() it returns the…
-
2
votes1
answer450
viewsChange URL Ajax Partialview Request
I need to change the URL of the page according to the Partialview that I load via Ajax. @EDIT In addition, I also need to free direct access to Partialview via URL, but, bringing with you the page…
-
2
votes2
answers971
viewsForm single field validation in Asp.Net MVC
I am developing an application that manages enrollment in courses, and in my registration form I have the field CPF, and I would like to know how I make this field unique, IE, bar the user to make…
-
2
votes1
answer105
viewsPerform a redirect in Constructor
How can I make a Response.Redirect() in a class builder? public class FarmaciaController : Controller{ public FarmaciaController(){ if(!userLogin.usuarioTemPermissao("Farmacia"))…
-
2
votes2
answers142
viewsIs it possible to send a list of javascript objects to a function in the contoller?
I’m returning a data list of an object type (GAR) function actualizarGARs controller’s: var listaGARTratadas = db.GAR.ToList(); return Json(listaGARTratadas); And in javascript I wanted to send this…
-
2
votes1
answer3790
viewsGetting objects with Jquery and sending via Ajax to MVC C#
I’m trying to understand how to receive HTML objects for a MVC C#controller. I know the code below works if the controller has string[] teste. <input type="hidden" name="teste"> <input…
-
2
votes1
answer69
viewsHTML attributes on webgrid lines
It is possible to include the attribute data-id-tarefa="@item.id" within each TR using Webgrid? I can include the attribute by Javascript, but all the Trs return me the same value of the id within…
-
2
votes3
answers1096
viewsPass Viewbag to _Layout
I need to pass a list to my layout where it is used in all my pages, I would like to know how I could do this?
-
2
votes1
answer103
viewsYou doubt Asp.Net MVC
The structure is View -> Controller -> Model ? I work with three layers but it’s not MVC. What does that stretch mean ? @{ ViewBag.Title = "Index"; } What is Actionresult ? You don’t have…
-
2
votes1
answer596
viewsProblem with Bundle scripts
When I publish my Asp.net mvc application the Bundle script generates a ref. scripts problem. As in the debug environment do not use the Bundles the problem does not happen. Error:…
-
2
votes1
answer221
viewsApplication Layer
Based that question and that other question, in an environment that uses the Entity Framework and Asp.net MVC. I see in many examples the non-use of the application layer, a use of the data layer…
asp.net-mvc software-architecture entity-framework-6 software-engineeringasked 10 years, 2 months ago Diego Zanardo 3,301 -
2
votes1
answer123
viewsStored Proc X Entity - Is this a good decision?
On Entity Framework days, is doing an MVC project using Stored Procedure a good way forward? I have always heard this: If you opt for RU it makes no sense to use SP, but I have heard people say that…
-
2
votes1
answer641
viewsConstructor class Abstract
I’m failing to develop the following environment: public abstract class AplicacaoGenerica<TEntity> where TEntity : class { private IRepositorio<TEntity> repositorio; public…
-
2
votes1
answer285
viewsUsing Identity in an Asp.Net MVC 5 application with Web Api and vice versa
When I create a project Asp.Net MVC with Individual User Accounts i can get into the application this way: var result = await SignInManager.PasswordSignInAsync(model.Email, model.Password,…
-
2
votes2
answers473
viewsEnd of ASP.NET Webforms?
I wonder if there is a certain trend in ASP.NET Webforms if "retire", leaving only ASP.NET MVC, because according to this article the answer would be yes. The author of the article (Ramon Durães) at…
-
2
votes1
answer302
viewsDropdownlist with checkbox
Would anyone know a way to make one DropdownList with checkbox? I have the following Dropdownlist: @Html.DropDownListFor(model => model.CD_AFFILIATE, new SelectList(@ViewBag.list,…
-
2
votes1
answer1065
viewsCanvas Search Field (ASP.Net - MVC)
Good afternoon, I wonder if someone could help me. I’m a beginner in programming, and I’m developing a Web system, and I need a screen search of the screens you’ve already created. As I use the MVC…
-
2
votes2
answers303
viewsHow to resolve ASP.NET MVC URL ID?
The system URL is in format http://localhost:52962/Funcionario/Edit?ID_FUNCIONARIO=7 This in my case is a problem, because if the user changes this 7 to 11 for example, he will get employee 11(which…
-
2
votes1
answer1899
viewsCalling the browser digital certificate
How do I call the browser digital certificate so that my webapp on Asp.net mvc can sign an xml and then return it to the user? I have seen features that use java or another applet, but I would not…
-
2
votes2
answers108
viewsC# and Mysql with Aspnetusers, deleted tables
I am developing a system with C# (MVC) and Mysql. Everything works perfectly well when using my local database instance. I duplicated this database on Uolhost and that’s when something bizarre…
-
2
votes1
answer189
viewsASP NET MVC authentication
What better way to separate permissions for logged in users? Would it be using annotations and roles? Because I want to release certain pages and certain functions depending on the permission of the…
-
2
votes1
answer96
viewsAsp Net MVC Block Permission
I am separating the permissions in my application, I am using a custom authorization with the Authorize class, I can already separate permission by action and controller, I would like to know how to…
-
2
votes1
answer173
viewsAsp Net MVC Authentication Extending Authorizeattribute
I am doing authentication extending Authorizeattribute, I have two doubts, in my DDD application, I will create this class in DAL? And how I leave this global class to use on all controllers?
-
2
votes3
answers517
viewsCreate FTP access to a virtual directory on Azure
I have a Web App on Azure and created an internal folder as a virtual directory for a third-party developer to deploy a contracted system. I’m having great difficulty creating an FTP that only has…