
May 12th, 2008, 07:10 PM
|
 |
KIS
|
|
Join Date: Jul 2007
Location: USA
|
|
Quote: | Originally Posted by dcampos I did a search on this topic, but I didn't quite find what I need. I have a page that is returning a recordset from a stored procedure to a page. Once the page displays, I would like to have a "Save As" dialog box pop up so that the user can save this page as a text file. Can someone point me in the right direction as how to do this?
Thanks in advance. |
sounds like you want the client (javascript) Save As...but since you posted in the asp area perhaps this will give you an idea
Code:
<%
For i = 1 to 12
d = d & MonthName(i) & vbcrlf
Next
%>
<form action="dc.asp" method="post">
<textarea name="ta"><%=d%></textarea>
<input type="submit" name="submit" value="Save As">
</form>
<%
If Request.Form("submit") = "Save As" Then
Response.ContentType = "text/plain"
Response.AddHeader "Content-Disposition","attachment; filename=foo"
Response.Clear
Response.Write Request.Form("ta")
Response.End
End If
%>
__________________
Please give respect to those that helped solve an issue by clicking on the reputation icon
|