Most voted "asp.net-mvc-helper" questions
Helpers are components written for the Razor engine, in ASP.NET MVC, with the aim of simplifying the insertion of repeated and complex structures (components) into the presentation layer.
Learn more…8 questions
Sort by count of
-
11
votes3
answers17994
viewsWhat is the Difference Between HTML.Actionlink vs Url.Action?
Reading some tutorials of ASP.NET MVC I found these two helpers being used to do basically the same thing, which was to direct the user to a new view. So I wonder if there’s any more remarkable…
-
1
votes1
answer955
viewsHow to use Url.Action in a Razor Helper?
In an ASP.NET MVC5 project, I created a Helper inside the briefcase App_Code, however, when using the function Url.Action() in my Helper the following build error occurs: CS0103: The name 'Url' does…
-
1
votes1
answer33
viewsUnidentified tenum in html
I created the following helper: public static HtmlString DropDownListEnum<TEnum>(this HtmlHelper htmlHelper, string name, int? valorSelecionado = null) { List<SelectListItem> lstEnum =…
-
1
votes2
answers1761
viewsASP.NET MVC - How to Change Textboxfor’s "Name" Attribute
You can change the name of the field generated by @Html.TextBoxFor ? I found nothing in Portuguese related to this. I tried something like: @Html.TextBoxFor(x => x.ToDate, new { name = "to" }) If…
-
1
votes1
answer32
viewsblank option @htm.Enumdropdownlistfor MVC5
I’m having a problem in my Razor, I want the option that comes selected is a blank. my Razor is like this: @Html.EnumDropDownListFor(m => m.Endereco.Zona, string.Empty ,new { @class =…
-
0
votes0
answers677
viewsDropdownlist with data from an Enum
I need to make a Helper where I pass an Enum and it mounts a Dropdownlist based on all values of Enum, I tried to do as follows: C#: public static HtmlString DropDownListEnumFor(this HtmlHelper…
-
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
votes1
answer283
viewsProblem with ASP.NET Checkbox "The Parameter Conversion from type 'System.String' to type 'System.Boolean' failed."
I’m having the following problem with a checkbox I have a checkbox list that is dynamically loaded (as the items that exist in the bank a checkbox is generated). I currently have only three items…