Questions tagged as 'asp.net-mvc'

1
answer

Retrieve IEnumerable values from View [duplicate]

I have a table / model called ItemPriceFactory: public class ItemTabelaPreco { public string Nome { get; set; } public decimal ValorUnitario { get; set; } public int QtdPacote { get; set; } public decimal ValorPacote { get; s...
asked by 27.04.2017 / 14:35
1
answer

Failed to create a website on iis 8

I'm trying to publish my application to a server windows server 2012 and IIS 8. I deployed the files to the proper folder. In IIS, when I create a new site and test the connection, I get the following failure: How to correctly configure I...
asked by 13.10.2014 / 16:53
5
answers

Doubt with foreach with group by asp.net mvc

I have a query with grouping. public List<TB_POSSIBILIDADE> ListarTodos(int id) { var strQuery = ""; strQuery += " select "; strQuery += " a.IDPOSSIBILIDADE,"; strQuery += " a.IDTI...
asked by 27.07.2016 / 22:46
2
answers

Creating a collection

The two images are how my array is. In the first image I have an array with 3 items, the first of the month of April and contains 4 passages. For each ticket I have the respective participants. My problem is in sending this array to my...
asked by 12.04.2014 / 03:42
2
answers

Is it possible to run ASP.NET MVC without IIS?

Is it possible to run an ASP.NET MVC application without IIS? I wanted the user to run this ASP.NET MVC application without having to configure IIS, I found #
asked by 29.08.2016 / 21:12
2
answers

How to receive information in a View?

I programmed my controller as follows: [HttpPost] public ActionResult Login(string pUsuario, string pSenha) { usuario oUsuario = modelOff.usuarios.Where(p => p.usuario1 == pUsuario && p.senha == pSenha).SingleOrDefault();...
asked by 28.07.2017 / 16:55
3
answers

Mask in table values

I am looking for a way to create "masks" for the values of my table in ASP.NET. Currently, I'm displaying values like this: @model TB_RESUMO_GERAL List<TB_RESUMO_GERAL> rg = (List<TB_RESUMO_GERAL>)ViewData["relatorioGeral"]; ....
asked by 03.08.2017 / 16:13
2
answers

Extra information on a user's login

My scenario is as follows: The user will log into the system. Then it will display a list of items and it will pick one. I then need the system to store the logged-in user and the item he chose. I do not know how I can be doing this and...
asked by 30.09.2014 / 15:59
2
answers

How do I get a property of an object in a Session?

In my Controller , I have a ActionResult responsible for logging in the user: [HttpPost] public ActionResult Valida(string pUsuario, string pSenha) { oUsuario = modelOff.usuarios.SingleOrDefault(p => p.usuario1 == pUsuario...
asked by 30.08.2017 / 03:36
2
answers

How to check if the email is already registered in the database?

The Controller is always returning the error message when the email is registered in the database. [HttpPost] [ValidateAntiForgeryToken] public ActionResult Create([Bind(Include = "Id,Nome,Email,Senha")] Pessoas pessoas) { if (pessoas != n...
asked by 26.10.2018 / 18:29