Click here to Skip to main content
15,908,173 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi
I have one checkBox that populates a textbox when checked but the check_changed method is not firing

here's the checkbox properties
C#
<asp:CheckBox ID="chkFinish" runat="server" 
                                            oncheckedchanged="chkFinish_CheckedChanged" Text="Finish" />



Here's the Check_changed method
C#
protected void chkFinish_CheckedChanged(object sender, EventArgs e)
        {
            if (chkFinish.Checked)
            { txtPrice.Text = Convert.ToString(ProdFPrice); }
            else
            { txtPrice.Text = Convert.ToString(ProdPrice); }
            
        }



Thank u in advance
Posted
Comments
[no name] 9-Aug-12 9:04am    
make AutoPostBack=True....

Try:
ASP.NET
<asp:checkbox id="chkFinish" runat="server" oncheckedchanged="chkFinish_CheckedChanged" text="Finish" autopostback="True" xmlns:asp="#unknown" />
 
Share this answer
 
Comments
mlingo209 9-Aug-12 9:05am    
it works well without the xmlns:asp="#unknown" thank you but how do I make the the popup panel stay in the front of the page making the rest inaccessible. because the checkbox is on a pop panel and every time I click on the checkbox the panel does not dissappear but gets docked on the very page I'm using it on and the rest of the page is still accessible
Volynsky Alex 9-Aug-12 9:07am    
Good answer!
Prasad_Kulkarni 10-Aug-12 0:01am    
Thank you Alex!
Volynsky Alex 10-Aug-12 2:54am    
You are welcome
Mohamed Mitwalli 17-Aug-12 14:13pm    
5+
Change the autopostback property to true for your checkbox and the evnt will fire.
 
Share this answer
 
Comments
Volynsky Alex 9-Aug-12 9:08am    
Good answer!

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