Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Event question?

Reply
Thread Tools

Event question?

 
 
jiangyh
Guest
Posts: n/a
 
      11-10-2004
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



 
Reply With Quote
 
 
 
 
Shiva
Guest
Posts: n/a
 
      11-10-2004
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)
{

}

"jiangyh" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
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




 
Reply With Quote
 
 
 
 
jiangyh
Guest
Posts: n/a
 
      11-11-2004
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


"Shiva" <(E-Mail Removed)> дʼ
news:(E-Mail Removed)...
> 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)
> {
>
> }
>
> "jiangyh" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> 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
>
>
>
>



 
Reply With Quote
 
Shiva
Guest
Posts: n/a
 
      11-11-2004
Hi,
You can use it for TemplateColumn check boxes too.

"jiangyh" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
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


"Shiva" <(E-Mail Removed)> дʼ
news:(E-Mail Removed)...
> 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)
> {
>
> }
>
> "jiangyh" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> 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
>
>
>
>




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
image button click event fires before click event of button Purvi T ASP .Net 0 10-19-2004 06:19 AM
Catching a RequiredFiled Validator event in PageLoad or some other event? Lars Netzel ASP .Net 3 07-22-2004 10:48 PM
Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl. jorge ASP .Net 2 05-25-2004 11:45 PM
PreRender Event occurs immediatley after Load event =?Utf-8?B?QWxpcmV6YSBaaWFp?= ASP .Net 1 02-09-2004 10:19 AM
Event On Form From Control Event Dave Wurtz ASP .Net 1 12-09-2003 10:37 PM



Advertisments