Export (0) Print
Expand All
0 out of 3 rated this helpful - Rate this topic

HtmlHelper.AnonymousObjectToHtmlAttributes Method

Replaces underscore characters (_) with hyphens (-) in the specified HTML attributes.

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)
public static RouteValueDictionary AnonymousObjectToHtmlAttributes(
	Object htmlAttributes


Type: System.Object

The HTML attributes.

Return Value

Type: System.Web.Routing.RouteValueDictionary
The HTML attributes with underscore characters replaced by hyphens.

Using this method helps to create markup that is compliant with HTML5.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.