Monday, January 27, 2014
ASP.NET 4.0 ClientModID
We can use control ID in script (insiede html page or js file) without using ClientID clause
like we have
<asp:textbox id="txtID" runat="server" text="0"></asp:textbox>
in order to get its value in script we need to write
'<%= txtID.ClientID %>'
to manipulate its value , but now we can set ClientIDMode property to access controls just like we access html controls in script
<asp:textbox clientidmode="Static" id="txtID" runat="server" text="0"></asp:textbox>
we can access its value in script
('@txtID').val();
http://weblogs.asp.net/asptest/archive/2009/01/06/asp-net-4-0-clientid-overview.aspx
http://stackoverflow.com/questions/5666011/retrieve-id-of-server-control-using-jquery
Labels:
asp.Net
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment