Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Displaying text of different types in a webcontrol

Reply
Thread Tools

Displaying text of different types in a webcontrol

 
 
Novice
Guest
Posts: n/a
 
      05-28-2004
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
displaying different content types in same page subha Perl Misc 16 01-28-2006 04:59 AM
Displaying two different data types with operator ? John Smith C++ 1 10-09-2005 11:15 PM
Trapping an Exception ocurring in a Webcontrol at the Page or parent WebControl level. ASP .Net 2 01-31-2005 06:34 PM
WebControl inside of WebControl and attaching events Kasabaarde Sumta ASP .Net Building Controls 0 12-13-2004 09:51 PM
Can a webcontrol (webcontrol.dll) have a configuration file? Luis Ramírez. ASP .Net Building Controls 2 07-06-2004 04:35 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57