473,396 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Showing documents stored in the database in the browser

i am in the process of designing an application that uploads documents to the
webserver from my ASP.net \ winforms application and saved them in the
database. Now i have another page which show hyperlinks points to the
document names that are stored in the database but the question when the user
clicks on the document how woudl i show the document to the user, if the
document was being saved on the file system then i would simply redirect the
user to the location of the document on the webserver and the brower then
invokes word if this is MS work document or pdf if this is a pdf extions or
what ever. but in this case when the document is store in the datbase how
would i pull the document from the database, pop open the MS word or PDF
depending on the file extension which is again comming from the database? any
suggestions or links to code is appreciated.

thanks
Sameer
Oct 13 '06 #1
1 1217
Basically you stream the file out to the response object and set the content
type appropriately.

I've documented the whole process in detail here:
http://SteveOrr.net/articles/EasyUploads.aspx

--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net
"sameer" <sa****@discussions.microsoft.comwrote in message
news:CF**********************************@microsof t.com...
>i am in the process of designing an application that uploads documents to
the
webserver from my ASP.net \ winforms application and saved them in the
database. Now i have another page which show hyperlinks points to the
document names that are stored in the database but the question when the
user
clicks on the document how woudl i show the document to the user, if the
document was being saved on the file system then i would simply redirect
the
user to the location of the document on the webserver and the brower then
invokes word if this is MS work document or pdf if this is a pdf extions
or
what ever. but in this case when the document is store in the datbase how
would i pull the document from the database, pop open the MS word or PDF
depending on the file extension which is again comming from the database?
any
suggestions or links to code is appreciated.

thanks
Sameer

Oct 13 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Dave Smithz | last post by:
Hi There, Being quite new to MS-SQL I would like to ask if there is a general opinion of what approach should be taken to storing things like external documents and images in databases. ...
8
by: clintonG | last post by:
Membership is broken and who knows what else. Does anybody have any referrals to current documents that explain what was changed and how one might respond? <%= Clinton Gallagher...
7
by: Dave | last post by:
Apologies for the newbie question. I have created a vb.net program for my company that is designed to work with Word Templates (about forty of them that we commonly use) that are selected by the...
6
by: (PeteCresswell) | last post by:
User wants to go this route instead of storing pointers in the DB and the documents outside. Only time I tried it was with only MS Word docs - and that was a loooong time ago - and it seemed to...
2
by: Dariusz Tomon | last post by:
Hello, I have to design and develop web application (ASP.NET 2.0). The main point of it will be managing documents stored into database (SQL Server 2005). Advice me please how can I do it. What...
6
by: shantanu | last post by:
Hi All, I have a requirement to develop a search engine based on some search criteria that will search for the string or statement in all the documents uploaded in the website. The search result...
2
by: torbjorn.maro | last post by:
I'm the developer of an enterprise level web application that among other things handles documents. The documents are stored in a database. There is now simple functionality to check out and...
46
by: RAZZ | last post by:
Hello, Can anyone suggest me solution? I Need to manage different types of documents (doc,xls,ppt etc) in server. I have folder structure to maintain these documents in server. Say folder1 is...
3
by: reelrave | last post by:
Hello All, I've checked around a little on Google (and this group) and have found info similar to what I'm trying to do (i.e., changes that were made in the BE's tables are not reflected in the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.