Buttons on a web page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?TW9ydG9u?=

    Buttons on a web page

    I created a new web page and added a "Cancel" button.

    The cancel button is supposed to activate a clicked event.

    When I run the page in debug mode using IE 6 with a breakpoint set at the
    button_click subroutine and then click the button - nothing happens

    Any suggestions as to what I am missing?

    Regards

    Morton
  • =?Utf-8?B?WmVlc2hhbiBIYWlkZXI=?=

    #2
    RE: Buttons on a web page

    1 - Make sure that button has runat=server attribute set.
    2 - Attach the your handler/subroutine/menthod to button e.g. In C# you can
    do it as, this.button.Cli ck += new EventHandler(bu tton_Click);
    Probably the best place to add this line of code is InitializeCompo nent()
    method. You can define such interaction between control and its subroutine
    anywhere but you have to make sure that it must not be happened on postback
    event.

    Also make sure that your are not running your project in release mode if you
    are using the Microsoft Visual Studio.

    "Morton" wrote:
    I created a new web page and added a "Cancel" button.
    >
    The cancel button is supposed to activate a clicked event.
    >
    When I run the page in debug mode using IE 6 with a breakpoint set at the
    button_click subroutine and then click the button - nothing happens
    >
    Any suggestions as to what I am missing?
    >
    Regards
    >
    Morton

    Comment

    Working...