Re: Attach code to a button

Discussion in 'ASP .Net' started by Steve C. Orr, MCSD, Jul 29, 2003.

  1. You can output any javascript dynamically from your code behind using such
    function as:

    RegisterStartupScript:
    http://msdn.microsoft.com/library/d...mWebUIPageClassRegisterStartupScriptTopic.asp

    RegisterClientScriptBlock:
    http://msdn.microsoft.com/library/d...UIPageClassRegisterClientScriptBlockTopic.asp

    Attributes.Add:
    http://www.flws.com.au/showusyourcode/codeLib/code/NET_jsAddTo.asp?catID=5

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


    "Chuck Traywick" <> wrote in message
    news:408301c35600$3758a190$...
    > Wanted to try to attach code to either a webform button
    > or an HTML button the "old" way with
    > onclick="mysciptroutine" but get an error when I try to
    > do this that indicates the script block needs to be
    > registered.
    >
    > Is there an example of how to do this somewhere?
    >
    > Thanks
    >
    > Chuck
    >
     
    Steve C. Orr, MCSD, Jul 29, 2003
    #1
    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. Ashish
    Replies:
    2
    Views:
    960
    Ashish
    Feb 22, 2004
  2. Darrel
    Replies:
    4
    Views:
    2,291
    =?Utf-8?B?UGF0cmljay5PLklnZQ==?=
    Oct 26, 2004
  3. Replies:
    0
    Views:
    676
  4. Warren Tang
    Replies:
    1
    Views:
    564
    Warren Tang
    Sep 17, 2008
  5. Ashish

    how to attach javascript to toolbar button control

    Ashish, Feb 22, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    183
    Marshal Antony
    Feb 22, 2004
Loading...

Share This Page