How to programmatically register the __DOPOSTBACK script

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
 
K

Karl Seguin

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
 
H

Henri

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

Members online

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,999
Latest member
MakersCBDGummiesReview

Latest Threads

Top