Questions tagged as 'html-helpers'

2
answers

DisplayNameFor and DisplayFor

Studying ASP.NET MVC, I came across the following lines of code: @Html.DisplayNameFor(model => model.Title) @Html.DisplayFor(model => model.Title) I can not understand the difference between using DisplayNameFor and DisplayF...
asked by 08.08.2017 / 19:21
1
answer

ASP.NET Text-Box Character Limiter

I'm trying to implement a character limiter for this text-box, but I have no idea how to do this. It is a page of insertion of posts in a portal and the title must have a limit. <div class="form-group col-md-12"> <div class="form-...
asked by 25.08.2017 / 21:56
1
answer

Area Routes in ASP.NET MVC?

I'm working with areas but it is not working the route and I created 2 areas , inside one I created a folder called Cadastros and inside the other a folder called Tabelas . RegistrationsAreaRegistration.cs namesp...
asked by 30.07.2017 / 04:11
0
answers

ASP Net MVC - Insert html helper into string and render via Html.Raw

Talk to people, I have the following situation: I have a list of links registered in the database, which will be loaded according to the user's profile. I'm currently forced to do this: @Html.Raw(listaMenusSistema[i].HtmlMenu); This w...
asked by 29.08.2018 / 20:06
1
answer

Take the fields from a Select and pass to viewmodel

I have two Selects Multiple where their function is to change values as in the image below: ThefirstoneintherealisaDropDownListwherehelooksforthebankinformation,followshiscode:@Html.DropDownList("Avaible", ViewBag.Account as SelectList, n...
asked by 13.07.2018 / 15:30
2
answers

How do I leave my DropDownListFor equal to Select

How do I get my DropDownListFor, like this select where the first field can not be selected. <select> <option value="0" selected disabled>Selecionar</option> <option value="1">SEMANAL</option> <option val...
asked by 20.07.2017 / 15:30
1
answer

Html.Raw should I use in every application?

Hello everyone in PartialView of my site, I had to put Html.Raw to solve problems with accentuation (even in Head put UTF-8 and in web.config globalization) only with Html.Raw solved, my doubt is I can put in all fields (Title, Description and et...
asked by 14.08.2018 / 18:04
1
answer

Delete space in the name of an input

It's the following, I'm doing a foreach this way. int count = 1; @foreach (var item in Model) { <input name="itemId_@count" value="@item.ProdutoId" type="hidden"> count++; } The problem is that in processing t...
asked by 31.05.2018 / 21:15
1
answer

Helpers source code

Help source codes like TextBoxFor, for example, are available somewhere? I've already found customizations like this: public static System.Web.Mvc.MvcHtmlString DtxTextBoxFor<TModel, TValue> (this System.Web.Mvc.HtmlHelper<...
asked by 23.03.2018 / 14:29
0
answers

How to set a color of an Html.DisplayFor?

In my application I have this Html Helpers : @Html.DropDownList("estado", new List<SelectListItem>{ new SelectListItem {Text="Pago", Value="Pago"}, new SelectListItem {Text="Pendente", Value="Pendente"} }, "Selecione o...
asked by 02.03.2018 / 23:00