Hi,
Is there an out-of-the-box way to create unique "id" tags in ASP.NET MVC?
(Similar to the dreaded but sometimes useful ClientIDs in WebForms?)
This would be useful when rendering a partial view many times on a page.
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%-- Example Partial View --%>
<div id="<%=GenerateAUniqueIDHere()%>">
Content
</div>
<script type="text/javascript">
$("#<%=GenerateAUniqueIDHere%>").hide().fadein().css("font-size", "500%");
</script>
If not, it is easy enough to roll my own.
Thanks much,
Jon