How to trigger the CheckBox1_CheckedChanged event by change the checked value by code?

Discussion in 'ASP .Net' started by David, Dec 2, 2004.

  1. David

    David Guest

    Hi

    If I change the checked value of the checkbox by code, I can not trigger the
    CheckedChanged event of a checkbox control. Is there any way to implement it?



    Thank you very much!



    David
    David, Dec 2, 2004
    #1
    1. Advertising

  2. You have to make sure the checkbox "AutoPostBack" property is True.
    "David" <> wrote in message news:%...
    Hi

    If I change the checked value of the checkbox by code, I can not trigger the
    CheckedChanged event of a checkbox control. Is there any way to implement it?



    Thank you very much!



    David
    news.microsoft.com, Dec 2, 2004
    #2
    1. Advertising

  3. David

    David Guest

    Thanks,
    but I don't think you understood my question. I want trigger the event when I change the value by code not user click operation.
    Sure I have set autopostback to true, other the event would not fire even I use the mouse to click the checkbox.

    David
    "news.microsoft.com" <> wrote in message news:...
    You have to make sure the checkbox "AutoPostBack" property is True.
    "David" <> wrote in message news:%...
    Hi

    If I change the checked value of the checkbox by code, I can not trigger the
    CheckedChanged event of a checkbox control. Is there any way to implement it?



    Thank you very much!



    David
    David, Dec 2, 2004
    #3
  4. I think what you can do is write a new function and move the code in CheckedChanged event into the new function.
    Call this function when you change the value of the checkbox and in CheckedChanged event.

    "David" <> wrote in message news:...
    Thanks,
    but I don't think you understood my question. I want trigger the event when I change the value by code not user click operation.
    Sure I have set autopostback to true, other the event would not fire even I use the mouse to click the checkbox.

    David
    "news.microsoft.com" <> wrote in message news:...
    You have to make sure the checkbox "AutoPostBack" property is True.
    "David" <> wrote in message news:%...
    Hi

    If I change the checked value of the checkbox by code, I can not trigger the
    CheckedChanged event of a checkbox control. Is there any way to implement it?



    Thank you very much!



    David
    news.microsoft.com, Dec 2, 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. yurps
    Replies:
    1
    Views:
    6,887
    rajeshthangarasu1983
    Feb 29, 2008
  2. hiwa
    Replies:
    1
    Views:
    448
    Jon A. Cruz
    Feb 23, 2004
  3. BobbyMy
    Replies:
    0
    Views:
    193
    BobbyMy
    Aug 27, 2005
  4. R. Rajesh Jeba Anbiah

    Trigger change event (urgent)

    R. Rajesh Jeba Anbiah, Apr 15, 2004, in forum: Javascript
    Replies:
    2
    Views:
    98
    R. Rajesh Jeba Anbiah
    Apr 15, 2004
  5. xhe
    Replies:
    1
    Views:
    125
    Randy Webb
    Feb 9, 2007
Loading...

Share This Page