I need to generate unique identifiers for html elements in asp.net mvc application. In classic asp.net i could use
%>
May be this draft code help you:
static class MyIdGenerator { public static int NextID() { static int _id = 0; return _id++; } }
With static counter every call NextID() will return next Id;
NextID()