Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

In my ASP.net website, i added RadioButton1 and CheckBox1,
I set the property of runat = "Server" .

I write code in methods RadioButton1_CheckedChanged and CheckBox1_CheckedChanged for RadioButton and CheckBox respectively.


C#
protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
    Label1.Text = "any thing";
}


protected void RadioButton1_CheckedChanged(object sender, EventArgs e)
{
    Label1.Text = "any thing";
}




but the caller never goes to these methods, Why???????
Posted

1 solution

Add property Autopostback="true" like:
<asp:CheckBox runat="server" AutoPostBack="true" />


Good luck.
 
Share this answer
 
v2
Comments
MrLonely_2 3-Feb-11 14:06pm    
Thanks
Ed Guzman 3-Feb-11 14:25pm    
You are welcome :-)

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