ASP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingASP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old May 12th, 2008, 01:31 PM
dcampos's Avatar
dcampos dcampos is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 227 dcampos User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 5 h 36 m 38 sec
Reputation Power: 4
Red face Open "Save As" dialog box

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.
__________________
"We're Gonna Need A Lot More Men." Davy Crockett

Reply With Quote
  #2  
Old May 12th, 2008, 07:10 PM
keep_it_simple's Avatar
keep_it_simple keep_it_simple is offline
KIS
ASP Free Beginner (1000 - 1499 posts)
 
Join Date: Jul 2007
Location: USA
Posts: 1,031 keep_it_simple User rank is Major (30000 - 40000 Reputation Level)keep_it_simple User rank is Major (30000 - 40000 Reputation Level)keep_it_simple User rank is Major (30000 - 40000 Reputation Level)keep_it_simple User rank is Major (30000 - 40000 Reputation Level)keep_it_simple User rank is Major (30000 - 40000 Reputation Level)keep_it_simple User rank is Major (30000 - 40000 Reputation Level)keep_it_simple User rank is Major (30000 - 40000 Reputation Level)keep_it_simple User rank is Major (30000 - 40000 Reputation Level)keep_it_simple User rank is Major (30000 - 40000 Reputation Level)keep_it_simple User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 2 Weeks 2 Days 8 h 12 m 51 sec
Reputation Power: 340
Send a message via Yahoo to keep_it_simple
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

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingASP Development > Open "Save As" dialog box


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway