Results 1 to 6 of 6

Thread: [RESOLVED] HtmlTable - Creating Dynamically

  1. #1

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Resolved [RESOLVED] HtmlTable - Creating Dynamically

    I am creating an HtmlTable object dynamically at runtime and adding it to a PlaceHolder controls collection. All is well, except for the fact that I do not have a CssClass property. I need to specify this so that it picks up the style and looks like all other tables in my project.

    Any ideas?
    Last edited by simonm; Feb 27th, 2006 at 07:18 AM. Reason: Resolved
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  2. #2

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Re: HtmlTable - Creating Dynamically

    Ah...don't worry. I have solved it by using the Web Control Table object that has a CssClass property.
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [RESOLVED] HtmlTable - Creating Dynamically

    You could have done

    .Attributes.Add("class","classname")

  4. #4

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Re: [RESOLVED] HtmlTable - Creating Dynamically

    Really? Oh well...

    Also, I wasn't able to embed html tables within cells of other tables either, which I am able to do with the table web object so I guess I am better off using these anyway...
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

  5. #5
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [RESOLVED] HtmlTable - Creating Dynamically

    You sure can do that as well. How were you attempting it originally, if you remember?

  6. #6

    Thread Starter
    Fanatic Member simonm's Avatar
    Join Date
    Sep 2000
    Location
    Devon, England
    Posts
    796

    Re: [RESOLVED] HtmlTable - Creating Dynamically

    Quote Originally Posted by mendhak
    You sure can do that as well. How were you attempting it originally, if you remember?
    You can't do it dynamically in code. Or at least, I was gettig a Stack overflow error when I tried to insert an HtmlTable into a HtmlTableCell's controls collection.

    I really don't have the time to go into it in more detail now. It doesn't matter anyway because I've got it working fine using the Table Web Component...
    Everything I say is either loose interpretation of dubious facts or idle speculation rooted in irrational sentiment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width