|
Subject:
|
how to Export to Word file from aspx page ???
|
|
Posted By:
|
jay4ever_2000
|
Post Date:
|
4/20/2006 3:05:03 AM
|
hello all !!
i store uploadede files at D:\files\file1.doc like this and i have just entry of location path in my table. ok
now i want to export that file on user's pc through button on page
now wat should i do ??
how can i get paths and files files stored on D: drive which has entry on Table.
i tried this below :::
Response.AddHeader("Content-Disposition", "attachment:jay.doc")
wat i should write to get path on ABOVE line
Response.ContentType = "application/vnd.ms-word"
Dim tw As New System.IO.StringWriter
Dim hw As New System.Web.UI.HtmlTextWriter(tw)
dg.RenderControl(hw)
Response.Write(tw.ToString())
Response.End()
pls help me
|
|
Reply By:
|
BrianWren
|
Reply Date:
|
4/21/2006 12:03:04 PM
|
The path you enter for the attachment is the path to the source file. I presume you know where the resource is at the server end.
At the user's end, when a download works, they are presented with a Save/Open dialog, in which they supply the path for the saving part of the transaction.
(Not intended to be a full solution, just a consideration of one portion of the process.)
|