I needed to add a onclick event to a textbox in asp.net to change it to remove text from a textbox onClick when it is clicked.
The normal code would look something like this:
But, this won’t quite work because my textbox is in a UpdatePanel’s ContentTemplate and the javascript is not read on postback.
So, This is what I ended up doing (a simplified version):
This will add an endRequest handler to the end of the partial page postback so that you can call a nice little function at the end of it.
Hope this helps some people!