Click here to Skip to main content
15,390,197 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am using button on master page but when i click on button event not firing ..what should i do?
Posted
Comments
jomon_raju 10-Jul-13 4:59am
   
can you please post the button event code...
mohdniyaz169 10-Jul-13 5:02am
   
yes,
<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />

////
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write(" my name is niya z");

}
Thanks7872 10-Jul-13 5:10am
   
Put a break point at this line Response.Write(" my name is niya z"); and debug it. Does it come to breakpoint or not?

C#
private void goButton_Click(object sender, System.EventArgs e)
{
    Response.Write(" Hello World");
}
   
v2
Comments
mohdniyaz169 10-Jul-13 5:15am
   
i have 2 button on master page.. one is working 2nd button is not working..
here is the code..

</td><td valign="top" align="right">
<asp:Button ID="btnLoginPop" runat="server" Text="Login" CssClass="myButton2"
onclick="btnLoginPop_Click"/>
<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />
</td>

protected void btnLoginPop_Click(object sender, EventArgs e)
{
ModalPopupExtender1.Show();
}
is working
but
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write(" my name is niya z");

} is not working
Asp_Learner 26-Jul-13 10:47am
   
check your validators if you have ,may be some validator is obstructing ,may be there is an update panel also ,otherwise code should work
Priyanka7777 10-Jul-13 5:28am
   
Put a break point for second buttons click event.Does the control go there?
i think i have similar problem put updatepanel and add trigger of buttons it may work for you ......
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900