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

1
answer

What is the best way to leave a session value?

What is the best way to leave a value in session in asp.net mvc? This value can be changed by the user, when he wants, but as he uses the system, he will use the value of that session ... For example: Set a Patient, then, as you navigat...
asked by 24.10.2014 / 13:09
1
answer

Make more than one condition annotation asp.net mvc

I have my class and I have a property in it public TipoPessoa TipoPessoa {get;set;} The same is an enumerator that has value "Physical and Legal" And I have a property that is CNPJ or CPF public string Cpf_Cnpj {get;set;} How do...
asked by 29.08.2014 / 19:05
1
answer

Pass fixed value to repository

I have my repository, with method of adding public virtual T Adiciona(T entity) { _dbSet.Add(entity); return entity; } Not if it is possible, All my classes inherit from "ModelBase" public class ModelBase { [Key] public...
asked by 29.08.2014 / 17:54
1
answer

Java Authentication in DataBase generated by Asp.net MVC 5 (Generate passwordhash in Java same Asp.net MVC 5)

I need to Authenticate a user created in automatically in asp.net mvc 5 using the language java by Example:    user: so-and-so   password: Ab123456 Password recorded in the Database PasswordHash ACFCCbS1aKYPrQndKMluPDpLD51m1yh5UDBo49v1m...
asked by 24.07.2014 / 19:50
2
answers

Doubt 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> <td>@Html.Label("Razão Social")</t...
asked by 15.05.2014 / 15:53
1
answer

Search within a session

I have a function in controller that returns me a JSON , which I get in a JQuery and I mount my page. I, store her return in a session, as below: SessaoUtil.SalvarSession("PegaHotelPacote", package.Buscar((SessaoUtil.Recup...
asked by 28.03.2014 / 16:18
3
answers

How to get values from a session and download to variables?

I made this class: public class ConexaoParametrosTFV { public ConexaoParametrosTFV() { if ((SessaoUtil.Recuperar("ConexaoTFV") == null)) { AgaxturCmsEntities db = new AgaxturCmsEntities(); var r...
asked by 04.04.2014 / 17:58
2
answers

Fill combo dynamically with MVC 5

In my .cshtml file, I have these DIV's: <div class="grid_14"> <select id="txtDia" name="txtDia" class="grid_2" required> <option>Dia</option> </select> <select id="txtMes" name="txtMes" clas...
asked by 17.03.2014 / 15:12
1
answer

Page redirect issue on route

These are the routes { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( name: "Pacotes", url: "Passo/{name}", defaults: new { controller = "Passo", action = "Passo_01", name =...
asked by 18.03.2014 / 18:04
1
answer

How to change running route?

Use MVC5 and Visual Studio 2013. I created this route: Home/PaginaBase . This route calls a new page, called PaginaBase , which has header and footer similar to Index . This footer creates a Menu. When I select an item from thi...
asked by 10.03.2014 / 13:31