473,411 Members | 2,085 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,411 software developers and data experts.

click to download

Can I have this function?
When a user click on a link, my ASP page generates a text file call test.txt
containing a string of "This ia s test msg.", and then a download dialogue
appears.
Any reference for me?
Thanks in advance.

Apr 8 '07 #1
6 2266

<Elliotwrote in message
news:E9**********************************@microsof t.com...
Can I have this function?
When a user click on a link, my ASP page generates a text file call
test.txt
containing a string of "This ia s test msg.", and then a download dialogue
appears.
Any reference for me?
Thanks in advance.
How's this:-

<%
Response.CodePage = 950 ' Change to prefered codepage
Response.ContentType = "text/plain"
Response.CharSet = "big5" 'Change to Charset matching codepage
Response.AddHeader "attachment; filename=test.txt"
Response.Write "This is a test msg"
%>

Apr 8 '07 #2
Anthony, thanks a lot for your help.
I have tried it by adding your code to my empty ASP file, however, it
displayed an error 500 page. Did I do something wrong?

"Anthony Jones" <An*@yadayadayada.comwrote in message
news:uL**************@TK2MSFTNGP03.phx.gbl...
>
<Elliotwrote in message
news:E9**********************************@microsof t.com...
>Can I have this function?
When a user click on a link, my ASP page generates a text file call
test.txt
>containing a string of "This ia s test msg.", and then a download
dialogue
appears.
Any reference for me?
Thanks in advance.

How's this:-

<%
Response.CodePage = 950 ' Change to prefered codepage
Response.ContentType = "text/plain"
Response.CharSet = "big5" 'Change to Charset matching codepage
Response.AddHeader "attachment; filename=test.txt"
Response.Write "This is a test msg"
%>
Apr 8 '07 #3

<Elliotwrote in message
news:C8**********************************@microsof t.com...
Anthony, thanks a lot for your help.
I have tried it by adding your code to my empty ASP file, however, it
displayed an error 500 page. Did I do something wrong?
IIS5 (Win2000) or IIS6 (Win2003)?

Edit your application configuration properties and enable detailed error ASP
error messages.
IIS Manager - You application folder -Propeties -Home
Directory ->Configuration...-App Debugging -Send detailed ASP error
messages to client.

What do you get back now?
What is the system codepage of the server you are using?

>
"Anthony Jones" <An*@yadayadayada.comwrote in message
news:uL**************@TK2MSFTNGP03.phx.gbl...

<Elliotwrote in message
news:E9**********************************@microsof t.com...
Can I have this function?
When a user click on a link, my ASP page generates a text file call
test.txt
containing a string of "This ia s test msg.", and then a download
dialogue
appears.
Any reference for me?
Thanks in advance.
How's this:-

<%
Response.CodePage = 950 ' Change to prefered codepage
Response.ContentType = "text/plain"
Response.CharSet = "big5" 'Change to Charset matching codepage
Response.AddHeader "attachment; filename=test.txt"
Response.Write "This is a test msg"
%>


Apr 8 '07 #4
IIS5.
How can I know the system codepage of my server?
The followings are the technical information.

Error Type:
Microsoft VBScript runtime (0x800A01C2)
Wrong number of arguments or invalid property assignment:
'Response.AddHeader'
/test.asp, line 5
Browser Type:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.1; .NET CLR
2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.30)

Page:
GET /test.asp


"Anthony Jones" <An*@yadayadayada.comwrote in message
news:#c**************@TK2MSFTNGP03.phx.gbl...
>
<Elliotwrote in message
news:C8**********************************@microsof t.com...
>Anthony, thanks a lot for your help.
I have tried it by adding your code to my empty ASP file, however, it
displayed an error 500 page. Did I do something wrong?

IIS5 (Win2000) or IIS6 (Win2003)?

Edit your application configuration properties and enable detailed error
ASP
error messages.
IIS Manager - You application folder -Propeties -Home
Directory ->Configuration...-App Debugging -Send detailed ASP error
messages to client.

What do you get back now?
What is the system codepage of the server you are using?

>>
"Anthony Jones" <An*@yadayadayada.comwrote in message
news:uL**************@TK2MSFTNGP03.phx.gbl...
>
<Elliotwrote in message
news:E9**********************************@microsof t.com...
Can I have this function?
When a user click on a link, my ASP page generates a text file call
test.txt
containing a string of "This ia s test msg.", and then a download
dialogue
appears.
Any reference for me?
Thanks in advance.
How's this:-

<%
Response.CodePage = 950 ' Change to prefered codepage
Response.ContentType = "text/plain"
Response.CharSet = "big5" 'Change to Charset matching codepage
Response.AddHeader "attachment; filename=test.txt"
Response.Write "This is a test msg"
%>

Apr 9 '07 #5

<Elliotwrote in message
news:C9**********************************@microsof t.com...
IIS5.
How can I know the system codepage of my server?
The followings are the technical information.

Error Type:
Microsoft VBScript runtime (0x800A01C2)
Wrong number of arguments or invalid property assignment:
'Response.AddHeader'
/test.asp, line 5
That's my fault not being careful with the typing that line should read:-

Response.AddHeader "Content-Disposition", "attachment; filename=test.txt"

>
Browser Type:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.1; .NET CLR
2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.30)

Page:
GET /test.asp
>
"Anthony Jones" <An*@yadayadayada.comwrote in message
news:#c**************@TK2MSFTNGP03.phx.gbl...

<Elliotwrote in message
news:C8**********************************@microsof t.com...
Anthony, thanks a lot for your help.
I have tried it by adding your code to my empty ASP file, however, it
displayed an error 500 page. Did I do something wrong?
IIS5 (Win2000) or IIS6 (Win2003)?

Edit your application configuration properties and enable detailed error
ASP
error messages.
IIS Manager - You application folder -Propeties -Home
Directory ->Configuration...-App Debugging -Send detailed ASP error
messages to client.

What do you get back now?
What is the system codepage of the server you are using?

>
"Anthony Jones" <An*@yadayadayada.comwrote in message
news:uL**************@TK2MSFTNGP03.phx.gbl...

<Elliotwrote in message
news:E9**********************************@microsof t.com...
Can I have this function?
When a user click on a link, my ASP page generates a text file call
test.txt
containing a string of "This ia s test msg.", and then a download
dialogue
appears.
Any reference for me?
Thanks in advance.


How's this:-

<%
Response.CodePage = 950 ' Change to prefered codepage
Response.ContentType = "text/plain"
Response.CharSet = "big5" 'Change to Charset matching codepage
Response.AddHeader "attachment; filename=test.txt"
Response.Write "This is a test msg"
%>


Apr 10 '07 #6
It works perfectly, Anthony. You help me a lot. Thanks again for your kindly
intention.
"Anthony Jones" <An*@yadayadayada.comwrote in message
news:ui*************@TK2MSFTNGP06.phx.gbl...
>
<Elliotwrote in message
news:C9**********************************@microsof t.com...
>IIS5.
How can I know the system codepage of my server?
The followings are the technical information.

Error Type:
Microsoft VBScript runtime (0x800A01C2)
Wrong number of arguments or invalid property assignment:
'Response.AddHeader'
/test.asp, line 5

That's my fault not being careful with the typing that line should read:-

Response.AddHeader "Content-Disposition", "attachment; filename=test.txt"

>>
Browser Type:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; InfoPath.1; .NET CLR
2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.30)

Page:
GET /test.asp

>>
"Anthony Jones" <An*@yadayadayada.comwrote in message
news:#c**************@TK2MSFTNGP03.phx.gbl...
>
<Elliotwrote in message
news:C8**********************************@microsof t.com...
Anthony, thanks a lot for your help.
I have tried it by adding your code to my empty ASP file, however, it
displayed an error 500 page. Did I do something wrong?

IIS5 (Win2000) or IIS6 (Win2003)?

Edit your application configuration properties and enable detailed
error
ASP
error messages.
IIS Manager - You application folder -Propeties -Home
Directory ->Configuration...-App Debugging -Send detailed ASP error
messages to client.

What do you get back now?
What is the system codepage of the server you are using?

"Anthony Jones" <An*@yadayadayada.comwrote in message
news:uL**************@TK2MSFTNGP03.phx.gbl...

<Elliotwrote in message
news:E9**********************************@microsof t.com...
Can I have this function?
When a user click on a link, my ASP page generates a text file call
test.txt
containing a string of "This ia s test msg.", and then a download
dialogue
appears.
Any reference for me?
Thanks in advance.
How's this:-

<%
Response.CodePage = 950 ' Change to prefered codepage
Response.ContentType = "text/plain"
Response.CharSet = "big5" 'Change to Charset matching codepage
Response.AddHeader "attachment; filename=test.txt"
Response.Write "This is a test msg"
%>



Apr 10 '07 #7

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

Similar topics

2
by: Sugapablo | last post by:
Is there a way where an end user can download multiple files with one click? I have a database table that can return between 1 and 12 different filenames (JPGs). I'd like to have a single...
4
by: Robert Oschler | last post by:
Hello, I have a web site that has an audio file on it that I make available for download. Right now I'm using the "right-click/save-as" approach. This is because left-clicking the link to the...
1
by: Trikki | last post by:
Hi, Im very new to Javascript and i'm in the very early learning stages. My question is: I have a web page with 8 links on, i want to disable the left mouse click on 6 of these links but...
11
by: John Smith Jr. | last post by:
Is there a way to have the server send a file to client (ie download) from a button click and a filename string?
0
by: aarondouglas28 | last post by:
Hey all, I'm hoping someone can help me with a problem I'm having. I have a page that has a javascript based slide show of images on it. The user can press a play button and the page will cycle...
16
by: Barry Gilmore | last post by:
Is there a way to disable a button after it is clicked? I am trying to avoid having someone click on it twice while they wait for it to process. Thank you!
3
by: MeNotHome | last post by:
I am trying to automate web browser navigation and form fill out in vb.net Why doesn't this work? AxWebBrowser1.Document.Forms(0).All("action-download").click() I also tried...
1
by: mattcushing | last post by:
I'm trying to use a button click to download a file from a table I built using Iron Speed designer. When I am on my machine, it's fine, but when I move it to the server, it fails when it's...
5
by: ThunderMusic | last post by:
Hi, I'd need to find (or develop) a control of a map (worldwide if possible) where a user can click and drag to select an area by distance from the click point or using a square area (user's...
1
by: csubillr | last post by:
I have some files on my site that I want several family members to be able to view (photos) and then download. I have a page setup that gives them thumbnails (64x48) and allows them to view the...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.