Click here to Skip to main content
15,609,550 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hi everyone ,

I'm using masterpage. And i added a default.aspx using masterpage. After i added a button in to this page.

My aspx page :

<asp:Button ID="btn_kaydet" runat="server"  CssClass="buton_kayit_ekle"  Text="Kayıt Ekle" OnClick="btn_kaydet_Click" />

My aspx.cs page :

protected void btn_kaydet_Click(object sender, EventArgs e)
    tb_ad.Text = "Hello";

Now , problem is , button is not working. And when i try click to the button i can't see any mouse hover cursor. As like as the button isn't there.

Also i can't see buttons events in properties window. I see them just in source page's OnClick command.
Updated 2-Aug-14 18:47pm
ZurdoDev 2-Aug-14 22:11pm    
What do you mean it isn't working? It has 1 line of code and is very simple code.
kozmikadam 3-Aug-14 0:44am    
Yes , exacly ! But button isn't work. It's there just like an image.
ZurdoDev 3-Aug-14 21:22pm    
What do you mean it isn't working?
[no name] 5-Aug-14 8:43am    
Please put a break point in the button click event, and check whether it fires the event.

I solved the problem.

My button is in table , which one is a asp net control. So i use html table. And button is work now.
Share this answer
In order for ASP.NET controls to work, they need to be in a Form which posts back to the page.
Share this answer
kozmikadam 3-Aug-14 0:46am    
Button is in a contentplaceholder. And contentplaceholder is in a form tag in master page.

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