Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 20th, 2006, 03:05 AM
Authorized User
 
Join Date: Feb 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to Export to Word file from aspx page ???

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



 
Old April 21st, 2006, 12:03 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

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.)





Similar Threads
Thread Thread Starter Forum Replies Last Post
export asp.net page to ms word and embed images Itech ASP.NET 2.0 Professional 2 March 6th, 2014 03:39 AM
how to include .js file in .aspx page shanwaj ASP.NET 2.0 Basics 13 March 11th, 2008 07:36 AM
open pdf file within aspx page shaktis General .NET 3 November 2nd, 2007 12:58 PM
Urgent: word file on aspx page from sql server bijgupt ASP.NET 1.0 and 1.1 Professional 5 November 15th, 2006 07:27 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.