Event question?

Discussion in 'ASP .Net' started by jiangyh, Nov 10, 2004.

  1. jiangyh

    jiangyh Guest

    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
    jiangyh, Nov 10, 2004
    #1
    1. Advertising

  2. jiangyh

    Shiva Guest

    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" <> wrote in message
    news:...
    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
    Shiva, Nov 10, 2004
    #2
    1. Advertising

  3. jiangyh

    jiangyh Guest

    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" <> дÈëÓʼþ
    news:...
    > 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" <> wrote in message
    > news:...
    > 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
    >
    >
    >
    >
    jiangyh, Nov 11, 2004
    #3
  4. jiangyh

    Shiva Guest

    Hi,
    You can use it for TemplateColumn check boxes too.

    "jiangyh" <> wrote in message
    news:#...
    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" <> дÈëÓʼþ
    news:...
    > 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" <> wrote in message
    > news:...
    > 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
    >
    >
    >
    >
    Shiva, Nov 11, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Purvi T
    Replies:
    0
    Views:
    830
    Purvi T
    Oct 19, 2004
  2. Dave Wurtz

    Event On Form From Control Event

    Dave Wurtz, Dec 9, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    350
    Kevin Spencer
    Dec 9, 2003
  3. =?Utf-8?B?QWxpcmV6YSBaaWFp?=

    PreRender Event occurs immediatley after Load event

    =?Utf-8?B?QWxpcmV6YSBaaWFp?=, Feb 9, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,111
    Hans Kesting
    Feb 9, 2004
  4. jorge
    Replies:
    2
    Views:
    1,263
    jorge
    May 26, 2004
  5. Lars Netzel
    Replies:
    3
    Views:
    437
    Greg Burns
    Jul 22, 2004
Loading...

Share This Page