- Joined
- Jun 22, 2005
- Messages
- 8
- Reaction score
- 0
I've got a rather major problem.
Don't ask me why (if I knew I wouldn't be here) but one of my pages refuses to fire button events.
Now ... this is the really annoying bit .. it DOES fire other events (auto-postbacks from drop-down boxes, textboxes and also linkbutton click events).
Here is some of the code from my page (the one that WON'T postback with button events)
The button I am trying to fire is Button1
The ASPX file contains the following for my button:
I have set breakpoints on that event but it never triggers, I have checked the properties of that object and the Click event IS set correctly to the above subroutine.
No matter what I try and do, it won't call the Button1_Click routine when I click the button.
extreme frustration .. help??
One question though .. would CSS on the site be affecting this at all? (although another page on the site uses the same CSS settings, and the button events fire just fine!)
Don't ask me why (if I knew I wouldn't be here) but one of my pages refuses to fire button events.
Now ... this is the really annoying bit .. it DOES fire other events (auto-postbacks from drop-down boxes, textboxes and also linkbutton click events).
Here is some of the code from my page (the one that WON'T postback with button events)
The button I am trying to fire is Button1
Code:
private void InitializeComponent()
{
this.lkbPurchaseOrder.Click += new System.EventHandler(this.lkbPurchaseOrder_Click);
this.lbtProvisionalPrintEnquiry.Click += new
System.EventHandler(this.lbtProvisionalPrintEnquiry_Click);
this.Button1.Click += new System.EventHandler(this.Button1_Click);
}
private void Button1_Click(object sender, System.EventArgs e)
{
Response.Write("Hello");
}
The ASPX file contains the following for my button:
Code:
<asp:Button id=Button1 runat="server" Text="Abuse Me" Width="172px"></asp:Button>
I have set breakpoints on that event but it never triggers, I have checked the properties of that object and the Click event IS set correctly to the above subroutine.
No matter what I try and do, it won't call the Button1_Click routine when I click the button.
extreme frustration .. help??
One question though .. would CSS on the site be affecting this at all? (although another page on the site uses the same CSS settings, and the button events fire just fine!)