473,486 Members | 1,958 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Write Tab Delmited String out to MS Word - Response.ContentType

I am trying to output a tab delimited string out to MS Word by
specifying the Response.ContentType = "application/msword" without
success. I am able to do the smae exact thing to Excel by changing
the content type to application/x-msexcel. When I try with word the
page that is displayed is the contents of the web page (HTML...). It
looks like the Page itself is loaded twice after the post back when I
try with Word, but not with Excel

Here is my code to output to Word/Excel

Private Sub btnExportToWord_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles btnExportToWord.Click

Response.ContentType = "application/msword"
Response.Output.Write(GenerateExportString())
Response.End()
End Sub

Where GenerateExportString() is a tab demilted value.

Any help?

Thanks!
Erik
Nov 22 '05 #1
0 1036

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

Similar topics

0
2756
by: Philipp Lenssen | last post by:
I have a password-protected website with downloads. The password-protection needed its own login-screen, so I use a session-object. It works well but now I also want the downloads (PDFs and...
0
960
by: Erik Miller | last post by:
I am trying to output a tab delimited string out to MS Word by specifying the Response.ContentType = "application/msword" without success. I am able to do the smae exact thing to Excel by changing...
0
1735
by: hari krishna | last post by:
hi all, My requirement is to generate xl reports throu Asp.Net without installing xl on web server computer. i am using Response object and wrtifile method as below. i dont know whether it is...
1
3380
by: unotin | last post by:
I have an application in ASP that exports to Word using the Response.ContentType method. The application references another ASP page through the img tag that uses a Response.BinaryWrite (of an...
3
2230
by: Nicole Schenk | last post by:
I need to know the code I must write to respond xml to a data island as a result from a src request from the data island. Thanks so much
9
6325
by: msuk | last post by:
All, I have a well form block of XML that is stored in a C# string type and I just simply want to display it in the browser using Response.Write but when I try this I get the following error: ...
2
1330
by: Harry Simpson | last post by:
If i'm using : Response.ContentType = "application/vnd.ms-excel" or Response.ContentType = "Application/msword" Response.WriteFile(FilePath) Does the user have to have Word and Excel...
4
2209
by: Martin Feuersteiner | last post by:
Dear Group I'm new to http responses / requests and would be grateful if you can shed some light on this issue. Let's assume I've two pages, a.aspx and b.aspx. The buffer is set to false for...
2
1113
by: chalres | last post by:
i'd like to make some word and excel file from webpage this word file is the same as the webpage how can i make it?
3
7677
by: John A Grandy | last post by:
When writing rss xml to the client browser , is there any reason to load the rss xml string into an XmlDocument and then Response.Write() the XmlDocument.OuterXML.ToString() ? option 1: ...
0
7099
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
7123
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
7175
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7319
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...
0
5430
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3069
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
262
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.