Most voted "html-helpers" questions
Use this tag for questions related to the working methods of the Htmlhelper class of Razor. Use it in conjunction with the Razor and ASP.NET tag (or similar).
Learn more…15 questions
Sort by count of
-
3
votes0
answers279
viewsError anti-forgery cookie "__Requestverificationtoken" is not present happens only in Internet Explorer
I have a problem I have no idea how to fix. I have an Asp.net mvc app posted on my machine, where I can use all the features (create, Edit, delete) perfectly, whether in Chrome or IE. It turns out…
-
2
votes2
answers2426
viewsDisplaynamefor and Displayfor
Studying about ASP.NET MVC, I came across the following lines of code: @Html.DisplayNameFor(model => model.Title) @Html.DisplayFor(model => model.Title) I can’t understand the difference…
-
1
votes1
answer158
viewsArea Routes in ASP.NET MVC?
I’m working with areas but it’s not working the route and I created 2 areas, inside a created a folder called Cadastros and inside the other a folder called Tabelas. Cadastrosarearegistration.Cs…
-
1
votes1
answer283
viewsCharacter limiter in ASP.NET text-box
I’m trying to implement a character limiter for this text-box, but I have no idea how to do that. It is an insertion page of posts in a portal and the title needs to have a limit. <div…
-
1
votes1
answer228
viewsPick the fields of a Select and pass to viewmodel
Guys I own two Selects Multiple where their function is to change values as shown in the image below: The first in real is a Dropdownlist where he searches the bank’s information, follows its code:…
-
1
votes0
answers79
viewsASP Net MVC - Insert html helper into string and render via Html.Raw
Fala galera, 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 obligated to do so:…
-
0
votes1
answer172
viewsError creating a condition in Webgrid’s Html.Raw
I am trying to put a condition in a Webgrid line and the following error occurs: Cannot convert lambda expression to type 'string' because it is not delegate type Even based on this post Variable…
-
0
votes2
answers347
viewsHow do I make my Dropdownlistfor equal to Select
How do I leave my Dropdownlistfor, like this select where the first field cannot be selected. <select> <option value="0" selected disabled>Selecionar</option> <option…
-
0
votes1
answer36
viewsRemove space in the name of an input
It’s like, 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…
-
0
votes0
answers133
viewsHow to define 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",…
-
0
votes1
answer53
viewsSource code for Helpers
Helpers source codes such as Textboxfor are available somewhere? I’ve found customizations like this: public static System.Web.Mvc.MvcHtmlString DtxTextBoxFor<TModel, TValue> (this…
-
0
votes0
answers19
viewsMultiple Dropdownlist
After doing a lot of research in the documentation and checking right here at Stackoverflow, I decided to ask. My question is the following I created two Dropdownlists. View as it is now:…
-
0
votes0
answers29
views@Html.Pagedlistpager No Bootstrap
I am building a small project in Asp.net MVC and I need to make use of the X.Pagedlist library, I was able to make the pagination all right, but it is not applying the Bootstrap, which should be…
-
-1
votes1
answer545
viewsShould I use html.Raw in every application?
Hello in all Partialview of my site, I had to put Html.Raw to solve problems with accent ( even in Head put UTF-8 and in web.config globalization ) only with Html.Raw solved, my question is can I…
-
-1
votes1
answer72
viewsHTML vs markup auxiliaries
Apparently HTML and markup helpers can perform the same functions, like this example I found in microsoft documentation: HTML auxiliaries @using (Html.BeginForm("Register", "Account",…