If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > sending percent signs to another page

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-04-04, 10:37
aliaga61 aliaga61 is offline
Registered User
 
Join Date: Jan 2004
Posts: 36
sending percent signs to another page

when sending my search criteria with a percent sign to a page that opens an excel sheet, it doesn't recognize the percent sign

ex. i enter %ABC but the value sent to the next page is just ABC

here is my excel button that sends the info to the next page. how do i handle cases where a percent sign is entered? is it handled in this page or would it be handled in the page that handles the excel? Thanks.

<img alt='Export to MS Excel' src='Graphix/Button_Export_Excel.gif' style='position: relative; left: 2px; filter: alpha(opacity=100);' onClick='window.open("DR_Listing_Excel.asp?SType=< % =request.form("SearchType") %>&STele=<% =request.form("txtTele") %>&SOrga=<% =request.Form("txtOrga") %>&SDesc=<% =request.form("txtDesc") %>","New");' onmouseover='event.srcElement.style.filter="alpha( opacity=60)";event.srcElement.style.cursor="Hand"; ' onmouseout='event.srcElement.style.filter="alpha(o pacity=100)";' border='0'>
Reply With Quote
  #2 (permalink)  
Old 02-04-04, 10:46
Mirador Mirador is offline
Registered User
 
Join Date: Jan 2004
Location: Oslo
Posts: 45
Re: sending percent signs to another page

Hi there...

Not sure if you need something more "advanced" than this but i just used this solution :

<%
Response.Buffer = TRUE
Response.ContentType = "application/vnd.ms-excel"
Response.Flush()
%>

(on top of my asp page...)

then all the search results automatically opens up in Excel.

Dont take up any more server-capacity with this either..
Dont even have to have Excel installed on the server.

Best regards
Mirador.
Reply With Quote
  #3 (permalink)  
Old 02-04-04, 10:55
aliaga61 aliaga61 is offline
Registered User
 
Join Date: Jan 2004
Posts: 36
well, it works with response.flush() but it doesn't fix the problem don't know if this helps...but here's what is in the address bar showing what values are being sent

DR_Listing_Excel.asp?SType=Organizational%20and%20 Classified&STele=&SOrga=%MSG&SDesc=

the "%MSG" is the info i'm concerned with in this case.
Reply With Quote
  #4 (permalink)  
Old 02-04-04, 11:17
gyuan gyuan is offline
Registered User
 
Join Date: Dec 2003
Posts: 454
Try this:

<%= Server.URLEnCode(passValue) %>
Reply With Quote
  #5 (permalink)  
Old 02-04-04, 11:25
aliaga61 aliaga61 is offline
Registered User
 
Join Date: Jan 2004
Posts: 36
not sure how you mean to implement this...if you mean to replace &SOrga=<% =request.Form("txtOrga") %> with
&SOrga=<%= Server.URLEnCode(txtOrga) %> that did not work. it didn't recognize any part of %MSG
Reply With Quote
  #6 (permalink)  
Old 02-04-04, 11:29
gyuan gyuan is offline
Registered User
 
Join Date: Dec 2003
Posts: 454
&SOrga=<%= Server.URLEnCode(Request.Form("txtOrga") ) %>
Reply With Quote
  #7 (permalink)  
Old 02-04-04, 11:42
aliaga61 aliaga61 is offline
Registered User
 
Join Date: Jan 2004
Posts: 36
great! thanks a lot!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On