?
Solved

Send text as query string

Posted on 2014-11-24
7
Medium Priority
?
120 Views
Last Modified: 2014-11-24
Is this possible?  ie: can I have a variable sSuppMsg that has the value "This is a test supplemental message." and attach it to an address as follows: "http://www.somesite.com/somepage.asp?supp_msg=" & sSuppMsg
0
Comment
Question by:Bob Schneider
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 33

Accepted Solution

by:
Big Monty earned 1332 total points
ID: 40462330
yes you can, it will be encoded automatically in the querystring when you send it over. just give it a try:

sSuppMsg = "This is a test supplemental message."
<a href="http://www.somesite.com/somepage.asp?supp_msg=" & sSuppMsg & ">link text</a>

and on somepage.asp:

Response.Write Request.QueryString("supp_msg")

if you have any special characters to worry about, you would use the Server.HTMLEncode function
0
 
LVL 53

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 668 total points
ID: 40462332
Like this?

sSuppMsg =  "This is a test supplemental message."

url = "http://www.somesite.com/somepage.asp?supp_msg=" & sSuppMsg

response.redirect url

Open in new window

0
 

Author Comment

by:Bob Schneider
ID: 40462548
Here is what I have now.  I am sending the page as html:

    Dim sSuppMsg
    sSuppMsg = Request.Form.Item("supp_msg_sample")
    sPageToSend = "http://www.ewebsite.com/misc/page.asp?event_id=" & lEventID & "&race_id=" & lRaceID & "&part_id=1&supp_msg=" & sSuppMsg

I have found that sending a page by html is kind of finicky and it works now so I don't really want to change it.  Does anything jump out with what I have here?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 33

Assisted Solution

by:Big Monty
Big Monty earned 1332 total points
ID: 40462554
everything looks good to me. the only thing you can change is

sSuppMsg = Request.Form.Item("supp_msg_sample")

to

sSuppMsg = Request.Form("supp_msg_sample")

other than that, what you have is correct.
0
 

Author Comment

by:Bob Schneider
ID: 40462614
Thanks folks.  User error...the "open this page in browser" link did not have the supplemental message query string.
0
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 40462622
>I have found that sending a page by html

Are you talking about sending a link via cdo mail where you are building your html on the fly?  That  can be tricky.   The key is to keep the html tight.   Render your html when you test it.  Make sure there are no white spaces as that will break your html.  

The 2 examples will probably break when sending as html email.  Notice the space between some> Some on the first line and the space after the quote on the 2nd somepage" > I have run into this myself
blah blah blah <a href="http://mysite.com/somepage"> Some page</a> blah blah
blah blah blah <a href="http://mysite.com/somepage" >Some page</a> blah blah

Open in new window

Should be
blah blah blah <a href="http://mysite.com/somepage">Some page</a> blah blah

Open in new window

0
 

Author Comment

by:Bob Schneider
ID: 40462946
Thanks a ton!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question