click to download

click to download

am 08.04.2007 12:37:26 von Elliot

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.

Re: click to download

am 08.04.2007 17:46:58 von Anthony Jones

wrote in message
news:E9ABFE2C-2D66-44F9-82C7-BE67153EC1A9@microsoft.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"
%>

Re: click to download

am 08.04.2007 21:32:08 von Elliot

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" wrote in message
news:uL#ulUfeHHA.4636@TK2MSFTNGP03.phx.gbl...
>
> wrote in message
> news:E9ABFE2C-2D66-44F9-82C7-BE67153EC1A9@microsoft.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"
> %>
>
>
>

Re: click to download

am 08.04.2007 23:24:29 von Anthony Jones

wrote in message
news:C8296E86-E0DA-4CA8-B079-1B1EC6208CF5@microsoft.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" wrote in message
> news:uL#ulUfeHHA.4636@TK2MSFTNGP03.phx.gbl...
> >
> > wrote in message
> > news:E9ABFE2C-2D66-44F9-82C7-BE67153EC1A9@microsoft.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"
> > %>
> >
> >
> >

Re: click to download

am 09.04.2007 15:07:51 von Elliot

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" wrote in message
news:#cTXMRieHHA.3956@TK2MSFTNGP03.phx.gbl...
>
> wrote in message
> news:C8296E86-E0DA-4CA8-B079-1B1EC6208CF5@microsoft.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" wrote in message
>> news:uL#ulUfeHHA.4636@TK2MSFTNGP03.phx.gbl...
>> >
>> > wrote in message
>> > news:E9ABFE2C-2D66-44F9-82C7-BE67153EC1A9@microsoft.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"
>> > %>
>> >
>> >
>> >
>
>

Re: click to download

am 10.04.2007 11:32:07 von Anthony Jones

wrote in message
news:C9F9B935-A7B9-40F5-9046-0B8DA3EBEAB5@microsoft.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" wrote in message
> news:#cTXMRieHHA.3956@TK2MSFTNGP03.phx.gbl...
> >
> > wrote in message
> > news:C8296E86-E0DA-4CA8-B079-1B1EC6208CF5@microsoft.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" wrote in message
> >> news:uL#ulUfeHHA.4636@TK2MSFTNGP03.phx.gbl...
> >> >
> >> > wrote in message
> >> > news:E9ABFE2C-2D66-44F9-82C7-BE67153EC1A9@microsoft.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"
> >> > %>
> >> >
> >> >
> >> >
> >
> >

Re: click to download

am 10.04.2007 13:40:45 von Elliot

It works perfectly, Anthony. You help me a lot. Thanks again for your kindly
intention.


"Anthony Jones" wrote in message
news:uiZqcM1eHHA.596@TK2MSFTNGP06.phx.gbl...
>
> wrote in message
> news:C9F9B935-A7B9-40F5-9046-0B8DA3EBEAB5@microsoft.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" wrote in message
>> news:#cTXMRieHHA.3956@TK2MSFTNGP03.phx.gbl...
>> >
>> > wrote in message
>> > news:C8296E86-E0DA-4CA8-B079-1B1EC6208CF5@microsoft.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" wrote in message
>> >> news:uL#ulUfeHHA.4636@TK2MSFTNGP03.phx.gbl...
>> >> >
>> >> > wrote in message
>> >> > news:E9ABFE2C-2D66-44F9-82C7-BE67153EC1A9@microsoft.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"
>> >> > %>
>> >> >
>> >> >
>> >> >
>> >
>> >
>
>