raise event from javascript

Discussion in 'ASP .Net' started by Nikhil Patel, Oct 18, 2004.

  1. Nikhil Patel

    Nikhil Patel Guest

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

    Thanks.
    Nikhil Patel, Oct 18, 2004
    #1
    1. Advertising

  2. Nikhil Patel

    Cirrosi Guest

    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.

    "Nikhil Patel" <> ha scritto nel messaggio
    news:%...
    > Hi all,
    > How can I raise the Click event of the LinkButton server control in
    > Javascript?
    >
    > Thanks.
    >
    Cirrosi, Oct 18, 2004
    #2
    1. Advertising

  3. 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/)
    alan.washington, Oct 19, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Oney
    Replies:
    2
    Views:
    4,391
    Natty Gur
    May 17, 2004
  2. Jacol

    raise or not to raise [Newbie]

    Jacol, Feb 3, 2007, in forum: Python
    Replies:
    5
    Views:
    394
    Gabriel Genellina
    Feb 5, 2007
  3. ernest
    Replies:
    2
    Views:
    271
    Roy Smith
    Nov 14, 2010
  4. Jack Bates
    Replies:
    0
    Views:
    263
    Jack Bates
    May 2, 2011
  5. bvdp

    Raise X or Raise X()?

    bvdp, Mar 11, 2012, in forum: Python
    Replies:
    10
    Views:
    343
    Stefan Behnel
    Mar 12, 2012
Loading...

Share This Page