Most voted "asp.net-mvc-5" questions
This tag should be used when the question refers to some features only available in version 5 (currently the latest) of ASP.Net MVC. ASP.NET MVC is an open-source Microsoft framework that implements the Model View Controller architecture standards for web development. Based on ASP.Net, allows software developers to build web applications following the Model View Controller architecture standards.
Learn more…937 questions
Sort by count of
-
1
votes1
answer100
viewsDoing research inside a Session
I have a role in controller that returns me one JSON, who picked up a JQuery and mount my page. I, store her return in a Session, as below: SessaoUtil.SalvarSession("PegaHotelPacote",…
-
1
votes3
answers3432
viewsHow to take values from a Session and download them into variables?
I made that class: public class ConexaoParametrosTFV { public ConexaoParametrosTFV() { if ((SessaoUtil.Recuperar("ConexaoTFV") == null)) { AgaxturCmsEntities db = new AgaxturCmsEntities(); var…
-
1
votes1
answer58
viewsFeed view fields to controller
I have used a way to load fields in the view as follows: I make a method by returning a Json in the controller, then create a Jquery function that takes this return and feeds the view fields, in the…
-
1
votes1
answer145
viewsFeed Hidden field by clicking on a table column
This is my jQuery that builds HTML into my cshtml. $(data.resultado).each(function () { str += '<tbody>'; str += '<tr>'; str += '<td>'; str += '<label…
-
1
votes1
answer1710
viewsPass parameters by jquery through a table
a question: I have a table and in it two columns, which are: CNPJ and Razão Social. Well, I need to do this: When I click on the column CNPJ, for example, should pass the value of CNPJ that is being…
-
1
votes1
answer1437
viewsLearning to use AJAX in ASP.Net MVC 4
In my project, I have two models different, generating with this, their controllers and your views. Only what happens is that I don’t know how to use AJAX and urgently needed a help from you. What…
-
1
votes1
answer1469
viewsBlock access to files from certain directories if not authenticated
How to block the access of certain directories if it is not authenticated? For example I have my url www.meusite.com/login User is not yet authenticated So I don’t want it to be able to access any .…
-
1
votes1
answer124
viewsJava Database Authentication generated by Asp.net MVC 5(Generate passwordhash in Java equal Asp.net MVC 5)
I need to authenticate an automatically created user in Asp.net mvc 5 using the java language for example: user: so-and-so password: Ab123456 Password recorded in the Database PasswordHash…
-
1
votes1
answer436
viewsDoubt in View and Controller construction with cardinality dependent entity N
I am on a project that I have a relationship of 1:N. Explaining better: Project is for a school where there are students and their occurrences. Then you would be a student for several occurrences:…
-
1
votes2
answers384
viewsCreate menu type, but with (+) sign (Treeview)
Use Bootstrap 3.1, Entity 6.1, Visual Studio 2013, MVC5, Jquery and etc... Well, I need to make a query, so that when the screen is loaded, it can carry some information, such as medicine…
-
1
votes1
answer472
viewsValidate without post with html helper Asp.net mvc
How do I validate using Html helper and data Annotation, but without giving post I mean, ex: Stringlength(10) While he is typing, go validating this annotation...(among others)
asp.net-mvc-5asked 10 years, 3 months ago Rod 9,412 -
1
votes2
answers81
viewsDoubt with mvc helpers
I have this include in my view(cshtml) @model List<SuporteTecnico.Models.T_PDV> Now I need to create a table, and in a TD I put the label and in another the Textbox. I did so: <tr>…
asp.net-mvc-5asked 10 years, 6 months ago pnet 14,727 -
1
votes1
answer289
viewsChecklistbox when dynamically loaded does not mount the check’s
When it was manual, the check’s(the check boxes) were all ok. As I now mounted via jquery and controller, no longer assembles the check’s, is like a listbox without being able to make selection. See…
-
1
votes1
answer181
viewsProblems with radiobutton in table(TR for each one) - Accepts that all are clicked
I have this table and these radios Buttons. I happen to select more than one radiobutton, it does not obey the question, from one selected the other does not. <table> <tr>…
asp.net-mvc-5asked 10 years, 6 months ago pnet 14,727 -
1
votes1
answer62
viewsPass fixed value to Repository
I have my Repository, with add method public virtual T Adiciona(T entity) { _dbSet.Add(entity); return entity; } Not if it’s possible, All my classes inherit from "Modelbase" public class ModelBase…
asp.net-mvc-5asked 10 years, 2 months ago Rod 9,412 -
1
votes1
answer61
viewsMake more than one condition Annotation Asp.net mvc
I have my class and in it I have a property public TipoPessoa TipoPessoa {get;set;} The same is an enumerator that has value "Physical and Juridical" And I own a property that’s CNPJ or CPF public…
asp.net-mvc-5asked 10 years, 2 months ago Rod 9,412 -
1
votes1
answer183
viewsError 500 in Asp.Net Awesome Library
I found browsing the internet this library ASP.net Awesome. I found it very functional and easy to use. According to the documentation to use a helper called Lookup, you need to have a controller…
-
1
votes2
answers921
viewsRecover Data Redirectaction mvc#
I have a student consultation, // POST: /Admin/Anuncio [HttpPost] public ActionResult Index(Estudante estudante) { if (ModelState.IsValid) { List<EstudantesEncontrados> list =…
-
1
votes1
answer274
viewsUrl.Action outside the Area
I separated the user registration of Asp.net mvc into an area Area Control In a registration action, it sends the confirmation link, it is generated as follows var callbackUrl =…
-
1
votes1
answer203
viewsHow to publish . mdf database in Azure SQL Dabases?
I have a solution with a project Asp.Net MVC 5 and I’m using Code First and Migrations to update the database .mdf automatically generated in the App_data folder. How do I put this .mdf in the Azure…
-
1
votes1
answer594
viewsReturn more than one data list in the view
In my Return View(), is there a way for me to return two or more lists? These lists are the result of a.
-
1
votes2
answers7019
viewsPass parameters through jquery to controller
I have a method in the controller(void) that receives some parameters(3). I am unable to pass to the method. The other times I did, passing to an object there, I have succeeded, with method…
-
1
votes1
answer114
viewsHow to pass multiple viewmodel to a single view?
I have my view, it depends on a viewmodel. But in this same view, I add items referring to the main one with a bootstrap modal, and in it I need another viewmodel for validations. How I pass 2…
asp.net-mvc-5asked 10 years, 1 month ago Rod 9,412 -
1
votes2
answers153
viewsView condition does not work
I’m checking if my Viewbag comes something So I’ll tell you what: @if (ViewBag.Itens != null) { foreach (var item in ViewBag.Itens) { <div class="col-md-6"> <div class="checkbox">…
asp.net-mvc-5asked 10 years, 1 month ago Rod 9,412 -
1
votes1
answer112
viewsAjaxbeginform replace does not work
I’m using a Ajax.BeginForm to update a specific div on the page. When performing Submit and executing the action, instead of updating this DIV, the page is updated with the partial view returned…
-
1
votes1
answer51
viewsWhat is the Order= parameter in the Authorize attribute?
What is the parameter Order in the Attribute AuthorizeAttribute of Authorization of Asp.NET? How to use it ?
asp.net-mvc-5asked 10 years, 1 month ago Rod 9,412 -
1
votes2
answers1537
viewsjquery method does not pass parameters to controller
Jquery does not pass parameters to controller. Empty values. Jquery: function GravaEvento() { var str = ""; var parametros = jQuery.parseJSON('{ "DE_Cnpj": "' + $("#txtCnpj").val() + '" ,…
-
1
votes1
answer304
viewsWhat better way to leave a value in session?
What better way to leave a session value on Asp.net mvc ? This value, can be changed by the user, when he wants, but as you use the system, will use the value of that session... For example: Set a…
asp.net-mvc-5asked 10 years ago Rod 9,412 -
1
votes1
answer2860
viewsHow to remove URL after upload?
I have my URL www.site.com/product/link/code/1 After loading, I would like the URL not to appear in the browser, just www.site.com How can I do that?
-
1
votes1
answer344
viewsTwo models and a controller
Following the reasoning of that other question of mine, where I create two models for manipulations, as if I could use a controller to make the manipulations in the tables ? My intention in doing…
-
1
votes1
answer96
viewsValidating response in controller is giving error
Need to validate the answer in my method in the controller. For this I need an if. Why does the method not consider the return within an IF? Thus: public JsonResult ValidaLogin(string _email, string…
-
1
votes1
answer286
viewsHow to remove querystring Returnurl?
How to remove querystring Returnurl from my Login page ?
asp.net-mvc-5asked 10 years ago Rod 9,412 -
1
votes1
answer124
viewsNavigation using @Renderbody
When we use @RenderBody, the other pages used with _Layout, is rendered only in there, correct? My question is: Assuming all our pages use the _Layout what’s that @RenderBody When browsing, it only…
asp.net-mvc-5asked 10 years ago Rod 9,412 -
1
votes2
answers351
viewsBinding in text field
In my project I have some tables between them one of occurrences and one of users, where a relationship between them of several occurrences for a user. What happens is that when registering an…
-
1
votes1
answer185
viewsUse Jquery Autocomplete in Id properties
I have my Model as follows public class Album { public int Id {get;set;} public int ArtistaId {get;set;} } public class Artista { public int Id {get;set;} } And in my view, I use:…
-
1
votes2
answers9397
viewsPlace image in bootstrap menu
As I put an image in the right corner of a menu bar with bootstrap. Below the code of my Layout(Master) <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta…
-
1
votes1
answer279
viewsHow to do Reload Asp.net mvc pagedlist?
I have my grid with the html helper Pagedlist <div class="table-responsive"> <table class="table table-hover"> <tr> <th> @Html.ActionLink("Id", "Index", new { OrderBy =…
asp.net-mvc-5asked 10 years, 2 months ago Rod 9,412 -
1
votes1
answer597
viewsPick up value on a checkbox checked item
I have this checklistbox. <div class="col-md-6"> <h3 class="text-center">Unidade de negócio</h3> <div class="well" style="max-height: 300px;overflow: auto;"> <ul…
-
1
votes2
answers6021
viewsButton/link inside a view redirecting to another view
I have the following address for a view: http://localhost/Configuracao/Details/1 Where create a button/link that redirects to another address from another view as follows: <a…
-
1
votes1
answer629
viewsDifficulty positioning table on screen with bootstrap - layout only
I need to make a layout on my page, as follows. That I have three textbox controls, one at the bottom of the other and picking the other side all the rest with a table. See below how I need. I tried…
-
1
votes2
answers262
viewsWhat is the difference between authorizecore and onauthorization
When will we create an attribute like AuthorizeAttribute We have these 2 properties to be overwritten What is the difference between the two? Both seem to have the same function [Edit] The namespace…
-
1
votes2
answers1388
viewsModal not redirect when running Post
I own a View where I open a Modal to register a new data. It is working perfectly. The problem is that when registering using this Modal, it redirects me to the pre-defined page in cController.…
-
1
votes1
answer3970
viewsPass a list of View objects to the Controller
I have a Customer class and an address, and a customer can have many addresses. I am trying to create a Client View where I can add as many clients as I want, and then I can add these addresses to…
-
1
votes1
answer545
viewsHow to upload multiple images to SQL Server using JSON in ASP.Net MVC?
I need to insert a set of information into the SQL Server database data, but along with them some pictures along with some strings. I’m wanting to move everything by JSON. Input to select image:…
-
1
votes1
answer873
viewsUndefined object reference for an object instance.?
Can anyone help me with the error below? I implemented based on this link Permissioncookie…
-
1
votes1
answer914
viewsC# MVC5 - Using Outputcache
I recently started studying the OutputCache and its uses due to a use in a corporate system. I’m using the OutputCache to load all menus that a user (logged in) will have access to. However, I want…
-
1
votes1
answer609
viewsUpdate modal content dynamically
I have a table with up to 10 services listed, and each row has a refresh button. By clicking the refresh button, a modal window opens with the data of this line, as well as a form for change.…
-
1
votes1
answer177
viewsPublish ASP.Net website
I did my first "website" test on ASP.Net and when I publish it to my normal ftp (I’m using visual studio 2013) I open the domain http://aizensecurity.freevar.com/ gets all these folders and stuff...…
-
1
votes0
answers108
viewsWhy does my Asp.net mvc tables have pk duplicated user?
I am using Asp.net Identity for authentication and authorization I have my user class: public class Usuario : IdentityUser<int, ApplicationUserLogin,ApplicationUserRole, ApplicationUserClaim>…
-
1
votes1
answer194
viewsIs it possible to make a basic CRUD in JSON file?
I have the following scenario. I have a news site on ASP.NET MVC that currently when accessing it, all information is taken from the bank. I want to take these requests from Front. I thought I’d…