R
Roberto Kohler
ASP.NET renames Textboxes and other controls in aspx files that use
master-pages ?
I've discovered that aspx files that use master-pages have their Textboxes
and other controls renamed before they are rendered. For example I have an
aspx file with a textbox named "City", when it gets loaded at the client,
the textbox "txtCity" is now named "ctl00$bodyContentPlaceHolder$City".
That means that if I am writing client side scripts that need to manipulate
the Textbox "City", they need to be re-written to manipulate
"ctl00$bodyContentPlaceHolder$City" instead of "City".
Is there a way to dynamically determine the text string ASP.NET is going to
prepend to the html tag names?
Is the text string ASP.NET prepends always "ctl00$bodyContentPlaceHolder$" ?
What is the best way to handle this?
master-pages ?
I've discovered that aspx files that use master-pages have their Textboxes
and other controls renamed before they are rendered. For example I have an
aspx file with a textbox named "City", when it gets loaded at the client,
the textbox "txtCity" is now named "ctl00$bodyContentPlaceHolder$City".
That means that if I am writing client side scripts that need to manipulate
the Textbox "City", they need to be re-written to manipulate
"ctl00$bodyContentPlaceHolder$City" instead of "City".
Is there a way to dynamically determine the text string ASP.NET is going to
prepend to the html tag names?
Is the text string ASP.NET prepends always "ctl00$bodyContentPlaceHolder$" ?
What is the best way to handle this?