Possible Duplicate:
Need the clientId of a textbox inside a content control using javascript
I have a script that needs to access a TextBox, but ASP.NET generates some crazy names: ctl00$ContentPlaceHolder1$txtEmpFirstName … client side scripting makes it impossible to know what to do to access this control.
How do we get around this? I also need to be able to access the text from server-side code when a button is pressed if that makes a difference?
You can access the TextBox’s
ClientIDproperty in your client side code.