NEWB Q: Do I use a repeater?

  • Thread starter Thread starter Benign Vanilla
  • Start date Start date
B

Benign Vanilla

I created a web site in ASP that is heavily data driven. On the home page,
http://iheartmypond.com/. The list of categories is gathered from the
database. I grab the distinct top level categories, and show them with the
first five level 1 sub categories. I then loop through the list and using
response.write, I build a table that formats the category lists as shown on
the home page.

I am trying to replicate this in ASPX and having all kinds of problems. I
have been told I cannot use response write to do this, and should use
response.write in ASPX at all. It has been suggested I use a nested repeater
to create this format, but I have not been able to create anything more then
this:

Category
Sub 1
 
Tampa .NET Koder said:
You can probably go and look at the datalist. If the repeater isn't giving
you what you want. Or, you can use string concantenation to add the HTML
text to a string and then output this on the aspx page in a literal control
or a label. I will see if anyone has any other suggestions
<snip>

I have not been able to get the datalist nor the repeater to do what I want,
but admitedly I am a newb to .NET, so it is probably me. This is why I am
posting. I am hoping someone can point me towards an example. The idea of
the label or text box may work if I can embed some more complex formating.
I'll try that, thanks.

BV.
 
Or you can get the data as an xml file using getxml from the dataset, create an xslt file for the style sheet. Create just a label on the aspx Then use xpathdocument and xmltransform objects to feed this into the label.

Dynamic Help is gives a great deal more on Repeater controls etc
 
Back
Top