Solved

Send text as query string

Posted on 2014-11-24
7
109 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
  • 3
  • 2
  • 2
7 Comments
 
LVL 33

Accepted Solution

by:
Big Monty earned 333 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 52

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 167 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
LVL 33

Assisted Solution

by:Big Monty
Big Monty earned 333 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 52

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

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…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

832 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