-
November 28th, 2010, 01:19 AM
#1
Button's OnClick event doesn't fire ?
Hi friends,
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" />
</MdsMenu:MenuItem>
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 ?
Thanks
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|