November 28th, 2010, 01:19 AM
Button's OnClick event doesn't fire ?
The following code is my ASP.NET page :
<MdsMenu:MenuItem Text="Button" Href="#">
<asp:Button ID="Button1" runat="server" Text="Button 01" OnClick="Button_Click" />
<asp:Button ID="Button2" runat="server" Text="Button 02" OnClick="Button_Click" />
I don't know why Button_Click event doesn't fire !!!
protected void Button_Click(object sender, EventArgs e)
Button senderButton = sender as Button;
Label1.Text = "شما دکمه " + senderButton.ID.ToString() + " را فشار دادید";
MdsMenu:MenuItem is my custom WebControl.
If I insert a Button control out of MdsMenu:MenuItem tag it works well but if I inserted it within MdsMenu:MenuItem tag it doesn't fire the concerned method.
What's wrong with my code ?
Tags for this Thread
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!