What is the EventName property when I set up a ASP.NET checkbox control as an async postback trigger for an asp.net update panel?
A:
OnCheckedChanged is the event name. You can autogenerate the method by double clicking the checkbox in the UI, and based on the checkbox name it will generate the method which will most likely be:
protected void CheckBox1_OnCheckedChanged(object sender, EventArgs e) {}
achinda99
2009-02-26 22:01:42
+1
A:
All you have to do is set AutoPostback to true and if your CheckBox is within the UpdatePanel you shouldnt have any problems
<asp:CheckBox runat="server" ID="chk_Name" AutoPostBack="true" OnCheckedChanged="chk_Name_OnCheckedChanged"></asp:CheckBox>
Then in the OnCheckedChanged function you can do whatever you need to do
protected void chk_Name_OnCheckedChanged(object sender, EventArgs e)
{
// Do stuff here
}
jmein
2009-02-26 22:03:15