HtmlHelper.AnonymousObjectToHtmlAttributes Method (Object)
Replaces underscore characters (_) with hyphens (-) in the specified HTML attributes.
Namespace: System.Web.Mvc
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
Syntax
public static RouteValueDictionary AnonymousObjectToHtmlAttributes(
object htmlAttributes
)
public:
static RouteValueDictionary^ AnonymousObjectToHtmlAttributes(
Object^ htmlAttributes
)
static member AnonymousObjectToHtmlAttributes :
htmlAttributes:Object -> RouteValueDictionary
Public Shared Function AnonymousObjectToHtmlAttributes (
htmlAttributes As Object
) As RouteValueDictionary
Parameters
htmlAttributes
Type: System.ObjectThe HTML attributes.
Return Value
Type: System.Web.Routing.RouteValueDictionary
The HTML attributes with underscore characters replaced by hyphens.
Remarks
Using this method helps to create markup that is compliant with HTML5.
See Also
HtmlHelper Class
System.Web.Mvc Namespace
Return to top