Dynamically access the table cell control's

Discussion in 'ASP .Net Web Controls' started by sivagururaja@gmail.com, Mar 19, 2007.

  1. Guest

    Hi All!

    There is one doubt in ASP.NET.
    There is one suituation to create a table dynamically and add the
    values based on the selection made in the previous page.
    And also create some check box dynamically for corresponding values.

    For ex.,
    If A is selected then create 2 checkboxes and
    if B is selected thed create 3 checkboxes

    'm passing the previous page values through Session object's and
    create the values and checkboxes successfully.

    What my problem is i con't access the checkbox in my Submit function.
    Because 'm declaring it locally at that time of creating the row
    cells.
    How can i access the Checkbox whether it's checked.

    Please help me and thanks for share ur valuable time to read this
    mail.

    Thanks,
    Raja s.
     
    , Mar 19, 2007
    #1
    1. Advertising

  2. Riki Guest

    You could assign an ID to your checkbox when you create it:
    myCheckbox.ID = "cb1"
    (make sure the ID is unique)

    Then, you can access it with
    Page.FindControl("cb1")

    --

    Riki

    <> wrote in message
    news:...
    > Hi All!
    >
    > There is one doubt in ASP.NET.
    > There is one suituation to create a table dynamically and add the
    > values based on the selection made in the previous page.
    > And also create some check box dynamically for corresponding values.
    >
    > For ex.,
    > If A is selected then create 2 checkboxes and
    > if B is selected thed create 3 checkboxes
    >
    > 'm passing the previous page values through Session object's and
    > create the values and checkboxes successfully.
    >
    > What my problem is i con't access the checkbox in my Submit function.
    > Because 'm declaring it locally at that time of creating the row
    > cells.
    > How can i access the Checkbox whether it's checked.
    >
    > Please help me and thanks for share ur valuable time to read this
    > mail.
    >
    > Thanks,
    > Raja s.
    >
     
    Riki, Mar 19, 2007
    #2
    1. Advertising

  3. Mark Guest

    Dynamic Controls

    When the control is created dynamically, Page.FindControl("DynamicControlName") does not work. I am still attempting to remedy this issue.

    EggHeadCafe.com - .NET Developer Portal of Choice
    http://www.eggheadcafe.com
     
    Mark, Mar 23, 2007
    #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. Phillip Roncoroni
    Replies:
    14
    Views:
    1,098
    Toby A Inkster
    Apr 5, 2004
  2. Replies:
    0
    Views:
    840
  3. Symphony

    add hyber link to table or table cell web control

    Symphony, Mar 15, 2005, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    393
    Ken Cox [Microsoft MVP]
    Mar 16, 2005
  4. douglasc
    Replies:
    0
    Views:
    179
    douglasc
    Nov 21, 2003
  5. kj
    Replies:
    5
    Views:
    132
    McKirahan
    Feb 12, 2004
Loading...

Share This Page