Questions tagged [asp.net-mvc-helpers]

templated short-cuts and controls for creating HTML elements and element groups to works with the ASP.NET MVC Framework

templated short-cuts and controls for creating HTML elements and element groups to works with the ASP.NET MVC Framework

24 questions
0
votes
0 answers

Apply Custom Id and Default Value to MVC5 Radiobuttonfor

I need to have unique Ids for each radio button in a collection in order to attach a jQuery function to only one radio button in the collection. However as noted in this article…
gemini6609
  • 332
  • 3
  • 7
  • 21
0
votes
1 answer

Unable to Highlight Active Link in MVC 4

i'm trying to highlight the current link in MVC 4 but i cannot do this, i'm sharing what i have done so far MenuHelper Extension: public static class MenuHelper { public static MvcHtmlString ListItemAction(this HtmlHelper helper, string…
0
votes
1 answer

using ajax form inside helper method

How do you use a mvc helper method to create a ajax.beginform? for ex: @helper AjaxForm(string action, string controller, object routevalues, AjaxOptions options, params MvcHtmlString[] fields) { // DOES NOT WORK …
Stian Standahl
  • 2,506
  • 4
  • 33
  • 43
0
votes
2 answers

How to bind data to Model's "Display" property with MVC3?

I have a model: public class TestModel { [Display(Name = "Date")] public DateTime Date { get; set; } } with Html.LabelFor helper method in Test.cshtml page @Html.LabelFor(m => m.Date ) and use this page with 2 MVC action methods: Create and…
Hau Le
  • 667
  • 2
  • 17
  • 42
0
votes
1 answer

Is hardcoding a default nopic image in my MvcHelperExtension bad design

I've just written an MVC helper method to write img tags for me, in the method I'm hardcoding a nopic image that should be used when no image path is passed in. I don't like the hardcoding but don't know what the best approach I could use (given…
Simon Martin
  • 4,203
  • 7
  • 56
  • 93
0
votes
1 answer

How do I add my own `Html` variable to the current viewpage?

Many MVC extensions use their own variable for the HtmlHelper on the view page, like you would mark up a Telerik helper as @Telerik().Helper. My extension is still stuck on the ol' HtmlHelper, so I can't say @Erisia().Helper and have to…
ProfK
  • 49,207
  • 121
  • 399
  • 775
-1
votes
1 answer

How do i get a dropdownlist to when a value is selected to display values for a employee in a chart in mvc using mvc chart helpers?

Hello basically I want a dropdownlist to display a list of employee names when the admin or whoever in management is using it selects a name the chart must display. Is this possible? If so please help me... public ActionResult CharterColumn() { …
-1
votes
1 answer

Html helper TextBox formatting string to Unix timestamp

Something really weird is happening when trying to create an EditorTemplate to generate a datepicker. The value passed to the template is a string but is being transformed to Unix timestamp. This string is actually previously transformed from a Unix…
Mario Lopez
  • 1,405
  • 13
  • 24
-1
votes
1 answer

Why foreach returns one row inside extension method?

Why foreach returns one row inside extension method?These codes run properly inside normal method.What could be reason for return one column? public static MvcHtmlString DropDownWithOpt(this HtmlHelper html) { IList c = new…
1
2