Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dynamicaly change ADs in ADRotator 1

Status
Not open for further replies.

thehms

Programmer
Jul 3, 2003
58
0
0
AE
hi all...

i am using an ADRotator control, what i want to do is to load the ads from an SQL 2000 DB. i have a table called 'ADs' and fields with all the attributes in the Ads XML file (ie. ImageUrl, NavigateUrl, AlternateText, Keyword, impressions).

i thought of 2 things that i could do:

1- let SQL Server export an XML file every, say, 24 hours with the format thats needed by the ADRotator.

2- load the table data and build it into a string and format the XML file in ASP.NET and write the output to the xml file.

i looked for the 1st one but i couldnt find it, and i used FOR XML AUTO clause in my select query, but the reesult is not formatted as i want it.

and for the second i dont know if it ispossible to write to a file in ASP.NET or not...

please help me out as to which approach is better (or if u have a 3rd one that even better) and as to how i can do it....

Thanx,
The HMS
 
Have you tried loading the data into a dataset? If not then it may be worth trying as DataSet's have a WriteXml property that allows to to save the results as an XML file.

----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
thank you ca8msm :)

it worked the way i want it exactly :D :D

The HMS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top