how do call asp:button click through javascript

Posted by Kannan1986 under JavaScript on 1/30/2010 | Views : 5302 | Status : [Member] | Replies : 3
how do call asp:button click through javascript




Responses

Posted by: Abhi2434 on: 1/30/2010 [Member] [Microsoft_MVP] [MVP] Silver

Up
0
Down
Do you mean to use Callback or Postback?

Callback will invoke a server event using ICallbackEventHandler, and IPosbackEventHandler (which is the default behaviour of any button, http://msdn.microsoft.com/en-us/library/system.web.ui.ipostbackeventhandler.aspx ) you can use IPosbBackEventHandler.

You can use
this.ClientScript.GetPostBackEventReference(this.btn, "arglist")
to get the Postback Reference
and
this.ClientScript.GetCallbackEventReference 
to get the Callback event reference.

You can also invoke your own AJAX method to do this.

Cheers.

www.abhisheksur.com

Kannan1986, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Poster on: 1/30/2010 [Member] Starter

Up
0
Down
You can go through following forum thread in asp.net

http://forums.asp.net/p/1043708/1461136.aspx

Thanks

Kannan1986, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Neeks on: 1/30/2010 [Member] Bronze

Up
0
Down
you can use __dopostback for calling the server moethod.

Kannan1986, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response