Displaying text of different types in a webcontrol

N

Novice

Hey all, I am wondering if anyone has an opinion as to which webcontrol would be best suited to display sections of data that may be just a regular paragraph, a bullet or a numbered list item

So in my database I have a table that contains text for one attribute. In another attribute there is an indicator of how to display that text - i.e. as a paragraph, a bullet, etc

If I had these three separate records/rows in that table
pKey | text | type_of_text |(more attributes here that establis
------------------------------------------------------------------------------------------------ the relationship between each of
1 | This is all the ways that you could go fishing: | paragraph |the records/rows in this table
2 | Use a net | bullet
3 | Use a fishing rod | bullet

Since repeater is the most flexible it seems likely that I should use a repeater web control - however, would I have to programmatically determine the type of the record/row and then generate the HTML for each record? Or could I use some feature of an existing web control that I could map each of the various possible types for the text to each record row - i.e. something like this in the .aspx file

<asp:Repeater><ItemTemplate (if %#Container.DataItem("type_of_text") = bullet%)><ul><li><%#Container.DataItem("text")%></ul></ItemTemplate

-------------------------------------
Or am I better off just writing a loop in the .Net code and creating the appropriate html depending on the type_of_text

Any ideas

Thanks
Novice
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top