Questions tagged as 'asp.net-mvc'

1
answer

InputMask for DisplayFor

I use jQuery Inputmask to add masks to my TextBox. But 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 it. Code in my View: Cargo: @Html.DisplayFor(...
asked by 22.01.2015 / 13:13
1
answer

How to add items in an Jquery array from an IENUMERABLE in .Net MVC?

How do I add items from a IEnumerable<T> to a JavaScript array? View: @using Colecao.ViewModels @model ConfiguracoesViewModel @foreach (var equipamento in @Model.Equipamentos) { //Gostaria de adicionar...
asked by 23.03.2015 / 13:08
2
answers

Asp.net MVC cache doubt

I have the following scenario: Public ActionResult ProdutoFornecedor01() { var produtos = _db.Produtos.Include(x => x.Fornecedor).OrderByDescending(x => x.ProdutoId).Where(x => x.Fornecedor.Id == 1).Take(10); return PartialV...
asked by 23.12.2014 / 22:59
2
answers

Subtract dates and compare with value

I have two dates: DataAcesso and DataAtual of type DateTime . I have one more field called TempoAtualizacaoAutomatica of typo byte . I need to subtract these dates and compare the result with TempoAtualizac...
asked by 29.12.2014 / 12:47
1
answer

Visual Studio 2012 MVC 3 - Button action does not work

I spent a few years without using visual studio. Now I've tried again and I came across a problem. I created a new web project in Visual Studio 2012, using the ASP.NET MVC 3 Web Application option. I asked for a new web form and put in it a B...
asked by 25.10.2014 / 21:19
1
answer

Problem with Html.Partial and ViewBag

I have my following controller: public ActionResult Index2(int Id= 0) { if (Id == 0) { return new HttpStatusCodeResult(HttpStatusCode.BadRequest); } ViewBag.ClienteId = Id; return View(); } public ActionResult Index3(int Id= 0) {...
asked by 27.10.2014 / 21:38
1
answer

Configure routes using ASP.NET MVC 5 areas

I'm trying to set up a route using area as follows: No RouteConfig.cs public class RouteConfig { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes...
asked by 01.06.2015 / 01:01
2
answers

How to publish an ASP.NET MVC project to a specified URL

So, I'm in a situation that I do not know how and do not even know if it's possible. I have a site in ASP.NET MVC, let's call it sitedokelvin.com , this site is an asp.net mvc project. And I also have another site, let's call it projectd...
asked by 28.09.2014 / 19:54
1
answer

Change URL Request Ajax PartialView

I need to change the page URL according to PartialView that I upload via Ajax. @EDIT In addition, I also need to release the direct access to PartialView via URL, but, bringing the "parent" page with me because I work with it so that it...
asked by 20.08.2014 / 18:48
1
answer

Model in sessions

I have a GRID (table) that when selecting an item through the ID I load the entity in a session via ajax. public static class Sessoes { public static Produto Produto { get { return (P...
asked by 20.08.2014 / 15:32