VBScript function with a button Click

Discussion in 'ASP .Net Web Controls' started by Eric, Feb 16, 2005.

  1. Eric

    Eric Guest

    Hi,

    I would to use a client VBScript function when I click on a button control.
    How can I link this event to the function ? I read something about
    AddAttributesToRender, but I do not want to create a new button class. Is
    there another way ?

    Regards.

    Eric
    Eric, Feb 16, 2005
    #1
    1. Advertising

  2. Try putting this in your code behind.
    MyButton.Attributes.Add("OnClick","MyVBScriptFunction()")

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://SteveOrr.net


    "Eric" <> wrote in message
    news:%...
    > Hi,
    >
    > I would to use a client VBScript function when I click on a button
    > control.
    > How can I link this event to the function ? I read something about
    > AddAttributesToRender, but I do not want to create a new button class. Is
    > there another way ?
    >
    > Regards.
    >
    > Eric
    >
    >
    Steve C. Orr [MVP, MCSD], Feb 16, 2005
    #2
    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. Purvi T
    Replies:
    0
    Views:
    830
    Purvi T
    Oct 19, 2004
  2. mike parr
    Replies:
    1
    Views:
    470
    Marina
    May 20, 2004
  3. Ben Fidge
    Replies:
    5
    Views:
    735
    S. Justin Gengo
    Jun 15, 2004
  4. Amy
    Replies:
    0
    Views:
    976
  5. Max2006
    Replies:
    2
    Views:
    1,565
    Walter Wang [MSFT]
    Sep 19, 2007
Loading...

Share This Page