954,600 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Literal Useage question

I've been working on a class which when called pulls images (the actual byte) from one table and then the corresponding product information from another table in a MYSQL database.

I then create a dynamic set of controls and add them to the layout. I wanted to place all the information into a UL/LI listing for sake of ease when styling with CSS/ Making it collapse and still be organized if all scripts/css fail to load.

'//Quick and dirty example.
Dim CreateLayout (byRef somePanel as Panel) as Panel

'//<UL>
Dim aspUL as new literal
aspULs.text = "<ul>"
SomePanel.Controls.Add(aspULs)

'//Label
Dim somelabel as new label
somelabel.text = "Item1"
SomePanel.Controls.Add(somelabel)

//</UL>
Dim aspULe as new literal
aspUL.text = "</ul>"
SomePanel.Controls.Add(aspULe)

Return somePanel
End function

This is just a dirty example of how I'm doing. This works and produces the result I want but I'm sure this isn't the proper way of doing things.

Any thoughts... is using literals in this fashion going to cause me problems in the future or do I have the right idea? Is there any other way to generate the ul/li tags dynamically from code behind?

jasystweb
Newbie Poster
9 posts since Feb 2010
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: