how to access a dynamic-created html checkbox in code?

Discussion in 'ASP .Net' started by trank, May 10, 2004.

  1. trank

    trank Guest

    I created some checkboxes(<input type=checkbox>) dynamically,and then I'd
    like to access these checkboxes in code behind using C#.
    For they are not standard controls like Windows Checkbox, I can't catch it
    by FindControl().....how can i do this?
    Many thanks a lot!

    By trank
     
    trank, May 10, 2004
    #1
    1. Advertising

  2. Unless you created these checkboxes as some sort of Server Control, you
    won't be able to access them in the CodeBehind class, as they will not be
    members of your Page class.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "trank" <> wrote in message
    news:#...
    > I created some checkboxes(<input type=checkbox>) dynamically,and then I'd
    > like to access these checkboxes in code behind using C#.
    > For they are not standard controls like Windows Checkbox, I can't catch it
    > by FindControl().....how can i do this?
    > Many thanks a lot!
    >
    > By trank
    >
    >
    >
     
    Kevin Spencer, May 10, 2004
    #2
    1. Advertising

  3. Hi, tran

    Try to catch it through Request.Form("yourcheckbox")

    Bin Song, MCP
     
    =?Utf-8?B?QmluIFNvbmcsIE1DUA==?=, May 10, 2004
    #3
    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. Ronald
    Replies:
    2
    Views:
    867
    Robbe Morris [C# MVP]
    Jan 17, 2006
  2. tom c
    Replies:
    6
    Views:
    518
    tom c
    Sep 6, 2006
  3. Replies:
    2
    Views:
    492
    Alexey Smirnov
    Jun 6, 2007
  4. pizzy
    Replies:
    0
    Views:
    179
    pizzy
    Mar 23, 2005
  5. pizzy
    Replies:
    5
    Views:
    399
    pizzy
    Apr 12, 2005
Loading...

Share This Page