Click here to Skip to main content
15,896,348 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I create Master Page in asp.net web application . In the contentplaceholder , i have button , but when rendering the page , and click on the button, doesn't fire.

how do it? thanks a lot.

C#
<asp:Panel ID="Panel1"  runat="server" DefaultButton="Button1">        
<asp:Button ID="Button1"  Text="register" ForeColor="Blue" Font-Bold="true"  Font-Names="tahoma" Font-Size="Medium" Height="40px" runat="server" onclick="Button1_Click"/>
  </div>
   </asp:Panel>
Posted
Updated 5-Jun-15 6:06am
v2
Comments
[no name] 5-Jun-15 12:21pm    
What issue you face, any error?
bernova 5-Jun-15 12:36pm    
when click on the button , doesn't fire
bernova 5-Jun-15 12:37pm    
Button1_click source code:
protected void Button1_Click(object sender, EventArgs e)
{
Page page = HttpContext.Current.Handler as Page;

Boolean re = SDKClass.News_InsertNew(Subject_News_textbox.Text.ToString(), Brief_News_textbox.Text.ToString(), CKEditor1.Text.ToString(), date_now_textbox.Text, "Image1", true);
if (re == true)
{
ScriptManager.RegisterStartupScript(page, page.GetType(), "message", "alert('register_news')", true);

}
}
[no name] 5-Jun-15 13:19pm    
what is </div> in panel control, is that control formatted properly?
bernova 5-Jun-15 13:22pm    
in the another thread , I read that put the button to the <div> tag , but doesn't fire yet.
what is the solution ?

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



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