How do I get the ID of a server control with jQuery?
E.g. I have
<asp:Label ID="label1" runat="server""></asp:Label>
and now I want to get "label1",
var id = ??
If you use ASP.NET 4.0 you can set attribute ClientIDMode="Static" and your code will looks following way:
<asp:Label ID="label1" runat="server" ClientIDMode="Static"></asp:Label>
js:
var id = 'label1';