raise event from javascript

  • Thread starter Thread starter Nikhil Patel
  • Start date Start date
N

Nikhil Patel

Hi all,
How can I raise the Click event of the LinkButton server control in
Javascript?

Thanks.
 
Yes you can.
First you need a control that have autopostback active (even if hidden) so
that in the page is written a javascript function
__doPostBack(eventTarget,eventArgument) that raise a postback event.
This is a little dirty but work.
Excuse for my bad english.
 
Add a linkbutton control (LinkButton1) to a webform. In the page_load add the following line of code:

LinkButton1.Attributes.Add("onclick", "alert('Worked')");

This will just launch a alert box but it should show you how to do what your looking for.

Alan Washington
http://www.aewnet.com
Hi all,
How can I raise the Click event of the LinkButton server control in
Javascript?

Thanks.

User submitted from AEWNET (http://www.aewnet.com/)
 
Back
Top