Similar to adrotator, but to generate text?

J

John Buchmann

On my site, i want a tiny section to display
quotes/testimonials from our customers. I want the text
to be randomly chosen from a file and then displayed
whenever a page loads.

I thought the Adrotator would work if i simply didn't
specify an image, and just used the AlternateText. The
text shows up, but it's inside an icon of a broken image.

Is there a .net control (built-into .NET) that can do
this?

If not, can you give any tips on how this is done by hand?

Thanks so much!
John
 
H

Hermit Dave

well you should have controls for that but you could write one without much
problems.
say you have xml file with say quotes.

load up the xml file in a dataset.
get the rowcount
use Randon.Next to generate a random between 0 and the RowCount -1
read the row and dispay its data.
optimise as needed... store data in cache or use singleton etc.

--

Regards,

Hermit Dave
(http://hdave.blogspot.com)
 
J

John Buchmann

Thanks Dave for the info. I hate working w/ XML, but in
this case it was easy. And it worked like a charm.
Thanks again!

John
 

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

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top