Event question?

  • Thread starter Thread starter jiangyh
  • Start date Start date
J

jiangyh

hi there:

I have a datagrid in my web form that contain a templet column.And in
this templet have a checkbox web control.I will get the checkbox state in my
serverside.

My question is which event I will add to my codebehind when I change the
checkbox state.

Thanks in advice.
jiangyh
 
In the <asp:CheckBox ...> tag, have OnCheckedChanged attribute that has the
name of the server-side event name. Eg:

<asp:Checkbox Runat=Server id="chk" OnCheckedChanged="CheckBox_Clicked" />

In the code-behind file:

void CheckBox_Clicked(Object sender, EventArgs e)
{

}

hi there:

I have a datagrid in my web form that contain a templet column.And in
this templet have a checkbox web control.I will get the checkbox state in my
serverside.

My question is which event I will add to my codebehind when I change the
checkbox state.

Thanks in advice.
jiangyh
 
hi Shiva:

thanks you help

But my Checkbox webControl in the DataGrid Template Column,so it can't
use OnCheckedChanged Event.

How to resolve this. thanks a lot.
jiangyh
 
Hi,
You can use it for TemplateColumn check boxes too.

hi Shiva:

thanks you help

But my Checkbox webControl in the DataGrid Template Column,so it can't
use OnCheckedChanged Event.

How to resolve this. thanks a lot.
jiangyh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top