By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,728 Members | 2,414 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,728 IT Pros & Developers. It's quick & easy.

Serve a file on page load (save file as)

P: n/a

I'm trying to do something fairly simple. I want to create a web page that
will take a parameter in the URL and return a file on page load. The file is
stored in a MSSQL 2005 database in an XML field (which is similar to a
varchar(max) field). The URL would look something like this:

99 being the value for primary key of the table, and the XML file would come
from the XML field in that record. When the user loads such a URL in a
browser, he/she would be prompted to save that file on disk. Could someone
point me in the right direction? I've looked for examples on how to do this,
but had no luck so far. BTW, I'm more familiar with C# than VB. I've set up
a SqlDataSource on my page, and that works fine. I tested it with a GridView
and I can see the contents of my XML field. Obviously, I don't wnt that page
to display anything. I juat want to return the XML field content as a file
to save.
Thank you,

Alain Quesnel
Dec 5 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.