I have htmlAttributes
generated - originally for the purpose of creating a link with the attribute using Html.ActionLink
.
Now, based on some condition, I would like to create a <span>
tag instead and put the attributes in there. Is there anyway it can be done easily ?
Eg: something like:
<span <%= htmlAttributes.Unpack() %> > Some txt </span>
OR
<%= Html.SpanTag("Some txt", htmlAttributes) %>
OR anything similar without wresling too much with the already generated htmlAttribues?
Thanks