Questions tagged as 'asp.net-mvc-5'

1
answer

Doubts about using .dbml files

I got a system in aspx (VS2008) and I have to make some improvements, add other features and all this using MVC5. Well, there's a web service, which has a guy like that: static Func<lqDataDataContext, T_PDV, IQueryable<T_PDV>>...
asked by 25.04.2014 / 16:15
2
answers

MapMvcAttributeRoutes with PagedList.MVC

I am using routes.MapMvcAttributeRoutes(); to decorate my Actions with Url that I want to appear in the browser, and it has worked very well, however, when using PagedList I have a problem that I can not solve. Below is the code...
asked by 02.05.2014 / 02:28
2
answers

Populate DropDownListFor dynamically with JQuery?

I'm trying to fill a DropDownListFor dynamically. This DropDownListFor eh to display the cities of the state, for example: The user chooses the state and in this DropDown the cities of that state are displayed. The problem i...
asked by 21.05.2017 / 22:27
1
answer

Validate Jquery does not work with Bootstrap Toggle

I'm using link , a simple toggle of true or false. Here is the code: View: <form id="myform"> @Html.CheckBoxFor(model => model.Permitir, new { id = "toggle1", data_on = "Sim", data_off = "Não", data_toggle = "toggle", dat...
asked by 12.01.2017 / 00:20
1
answer

Class attribute with pre-determined values

I want to create a class attribute for the gender ( M or F ), which by default the person can already select. Is it possible to create an array with these values ( M and F ) already default without typing, or should I do this in the same lay...
asked by 18.01.2017 / 23:23
2
answers

How to use Contains without depending on uppercase and minuscule [duplicate]

Follow the code: var result= db.Table.Where(l => l.Field== value).ToList(); var search = "jOãO pAuLo"; result = result.Where(l => l.Example.Contains(search)).ToList(); It only works like this: João Paulo , if that's the case...
asked by 16.03.2017 / 03:18
1
answer

Show fields of an entity in a different View

I have a Academic entity that has a Teacher , I want the Academic Detail Professor who belongs to this Academician . The code I'm already using is this: Teacher model: public class Professor : RepositorioBase<Professor> {...
asked by 08.11.2017 / 17:27
1
answer

Attempting to pass Controller values to Global.asax.cs to fill in the sessions

When I try to pass some value from my controller to Global.asax the values received in the global are always null. Controller: public class LoginController : Controller { DataContext db = new DataContext(); public ActionRes...
asked by 09.12.2016 / 13:46
1
answer

Store ListMenu In Memory or in Cookie

Good afternoon. I have an application that has a whole level of permission management for page access and a number of other settings. Always when a user authenticates, I mount a list with all the menus (links / pages) that this user can ac...
asked by 11.04.2016 / 20:36
1
answer

asp.net MVC Inheritance between Models

I'm trying to implement a person's registry where I have inheritances for both individuals and businesses, but my save method is not getting the person's type properly. Following sample code [HttpPost] [ValidateAntiForgeryToken] public asyn...
asked by 26.02.2016 / 15:16