htmlhelper

Using Webmatrix helpers in regular ASP.NET MVC project

Hi, The Webmatrix Html helpers look quite handy. Is there any way to use them from a regular ASP.NET MVC project with Visual Studio? Thanks, Adrian ...

How to avoid default URL encoding in ASP.NET MVC Html Helpers like RouteLink

I want my url like this: "http://domain.com/tag/高兴" My route mapping: routes.MapRoute("Tag", "tag/{name}", new { controller = "Tag", action="Index" }); But Html.RouteLink will encode the parameters as default. If I use Html.RouteLink in my View, the generated html is: <a href="/tag/%E9%AB%98%E5%85%B4">高兴</a> Is there any way to a...

How do I use the strongly-typed HTML helpers with nullable types?

I want to use the strongly-typed HTML helpers in ASP.NET MVC 2 with a property of my model which is Nullable<T>. Model public class TicketFilter { public bool? IsOpen { get; set; } public TicketType? Type{ get; set; } // TicketType is an enum // ... etc ... } View (HTML) <p>Ticket status: <%: Html.RadioButtonFor(m => m...

Is it possible to place to a conditional statement inside a Html.DisplayFor call?

Basically I have a custom built "Date" class "EndDate" in my MVC output model. FYI: The "Date" class builds of DateTime but hides the time functionality. I've created a display template for this Date type that formats the date nicely but in once instance (shown below) if the object is null (in this case for EndDate) I would like the te...

Looking to group specific items from a list based on names using linq, html helper related

Hi, I have a list of items I am retrieving which i wish to be grouped into divs depending on the common name that a set of the list items may have say for instance a list of firstnames I have. i would like to be able to create a div dynamically based on the items common attibutes. id 23 fistname darren id 37 fistname darren id 67 ...