Problem Creating Dynamic HTMLTable and Accessing Controls inside it

Discussion in 'ASP .Net Web Controls' started by Ashish Bhonkiya, Nov 1, 2003.

  1. Hi All,

    I have a situation where i need to create a table
    dynamically based on the number of records in the dataset.

    now my problem is not in creating the table but i have a
    Label1 Control with value Label1.Text = "MyLabelsValue"
    on the page
    when i am creating the rows in htmltable i need to add
    this Label1 to first row first column of the table till
    now i am able to do this.

    but when i submit the page and then try to access the
    value of the Label1 value disappers.

    is it beacuse i am doing Table1.Rows[0].Cells
    [0].Controls.Add(Label1); and when i post the form back i
    dont get this LabelControl beac its now a part of
    HTMLTable ?

    AnyIdeas will be of great help
    Thanks a Lot to all in advance.

    Regards
    Ashish Bhonkiya
     
    Ashish Bhonkiya, Nov 1, 2003
    #1
    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. suzy

    htmltable and table

    suzy, Jul 26, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    461
    Steve C. Orr, MCSD
    Jul 26, 2003
  2. Srinivas

    Dynamic HTMLTable row problems

    Srinivas, Jan 25, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    408
    Natty Gur
    Jan 26, 2004
  3. Diego

    HtmlTable.Visible and UserControl

    Diego, Feb 10, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    844
    Diego
    Feb 10, 2005
  4. Replies:
    1
    Views:
    2,059
    =?Utf-8?B?RFdT?=
    Feb 16, 2006
  5. Ashish Bhonkiya

    ProblemAccessing Controls inside HTMLTable created Dynamically

    Ashish Bhonkiya, Nov 3, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    109
    Ashish Bhonkiya
    Nov 3, 2003
Loading...

Share This Page