Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2004
    Posts
    36

    Unanswered: 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'>

  2. #2
    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.

  3. #3
    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.

  4. #4
    Join Date
    Dec 2003
    Posts
    454
    Try this:

    <%= Server.URLEnCode(passValue) %>

  5. #5
    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

  6. #6
    Join Date
    Dec 2003
    Posts
    454
    &SOrga=<%= Server.URLEnCode(Request.Form("txtOrga") ) %>

  7. #7
    Join Date
    Jan 2004
    Posts
    36
    great! thanks a lot!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •