How to programmatically register the __DOPOSTBACK script

  • Thread starter Thread starter Henri
  • Start date Start date
H

Henri

I'm designing a custom control and I would like to use the __DOPOSTBACK
JavaScript function.
Is there a way to make this function appear other than inserting a dummy
linkbutton inside my custom control?
asp.net controls like linkbutton must use Page.RegisterClientScriptBlock or
something to insert it but what is the key of the script?
Thanks for your help.
Henri
 
You can use Page.GetPostBackClientHyperlink(Control, Argument) which creates
all the necessary stuff (hidden fields and __dopostaback function) and
returns a string that you can assign to an href=""

Karl
 
Thanx Karl :-) !!!

Henri

Karl Seguin said:
You can use Page.GetPostBackClientHyperlink(Control, Argument) which creates
all the necessary stuff (hidden fields and __dopostaback function) and
returns a string that you can assign to an href=""

Karl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top