A
Alex Maghen
In ASP.NET 3.5, I want to understand the most elegant and recommended method
for writing JavaScript into a page generated from an .ASPX.
What I mean is, for example, the IDs of various page controls get completely
changed when the Control is a runat="server". So, for example, if I have a
control <asp:TextBox id="MyTB" runat="server"..., when I go to reference it
from JavaScrip on the client side, their's a good chance that the ACTUAL ID
of the text box will no longer be "MyTB" because of things like MasterPages,
etc.
Is there some kind of ServerControl in ASP.NET 3.5 that allows me to write
clean, elegant JavaScript on the server side that somehow gets properly
translated to handle these (and other) changes that ASP.NET makes to the page
controls?
Alex
for writing JavaScript into a page generated from an .ASPX.
What I mean is, for example, the IDs of various page controls get completely
changed when the Control is a runat="server". So, for example, if I have a
control <asp:TextBox id="MyTB" runat="server"..., when I go to reference it
from JavaScrip on the client side, their's a good chance that the ACTUAL ID
of the text box will no longer be "MyTB" because of things like MasterPages,
etc.
Is there some kind of ServerControl in ASP.NET 3.5 that allows me to write
clean, elegant JavaScript on the server side that somehow gets properly
translated to handle these (and other) changes that ASP.NET makes to the page
controls?
Alex