Last post Aug 10, 2010 01:09 PM by domenicfz
May 13, 2010 11:28 AM|CorbyNichols|LINK
First I will say I googled (Binged to make Bill happy) for this but could not find anything, perhaps I am not stating what I need correctly;
I have a website that a customer creates orders (for a printing company) and after the order, I would like to email the customer a link to view the status of their order;
I need to send the CustomerID in the link so on the returning page if a CustomerID is detected in the querystring, I "auto login" the client and open the "Dashboard" for the order page for that customer.
Can anyone point me in the right direction as to how to send the link and how to parse the querystring to get the values from the link;
Thank you if you can point me in the right direction.
May 13, 2010 09:38 PM|N_EvilScott|LINK
In your DashBoard you could make a function to check for the querystring on the Page_Load event. This event will check to see if the querystring exists, if it does then it will try to authenticate with the credentials and pull the data automatically. Here
is an example of how it could look:
This demo assumes you are using a querystring cid for Customer ID.
protected void Page_Load(object sender, EventArgs e)
private void CheckQueryString();
if (Request.QueryString["cid"] != null) // The customer ID number is present
// Perform necessary steps here to display data
else // The customer ID number is NOT present
// Perform necessary steps here to display other data
This method allows you to keep your current dashboard setup if you already have one, and check to see if its a returning customer. A word of caution though, it would be a best practice if you include some type of key you auto generate and store in your database
to do an authentication check and make sure its the ACTUAL customer, and not someone just changing the querystring number to see peoples orders on your web page.
With this method you could simply generate an email that includes a link with that user id on it and send it to the customer.
May 14, 2010 12:01 AM|CorbyNichols|LINK
Thank you for the information on the reading info from the querystring, how do I create the link to send in the email, http://www.mydomain.com/CID="1234" ?
May 14, 2010 02:31 PM|N_EvilScott|LINK
You construct it programatically. Do you already know how to send emails using the SmtpClient? You would basically just dump a string into the message body. So you would do something like.
// customer id string you pulled from database or saved from the order information
string cid = "CustomerIdHere";
string Url = http://www.mydomain.com?CID=;
inside of message you now put something like:
Url + cid;
May 17, 2010 04:56 PM|o0knight0o|LINK
if the above code dose not work you may wana try this one.
string cid = "CustomerIDHere";
string url = "<a href='http://www.mydomain.com?CID= " + cid + "' >View Transaction</a>";
this however takes in account the clients email supports html.
Jun 11, 2010 01:31 AM|gsalunkhe|LINK
I need to send the email to client showing the search result he have done on a web service.
The problem is how to send the URL to client, Client should able to see the well formated .aspx page(html) in this inbox not the URL.
Aug 05, 2010 04:22 PM|domenicfz|LINK
Quick question for you, our company does call tracking and they the option of doing a custom postback to and email_notification page that we have. This page is in PHP and reads the URL variables and sends an email using those variables, i.e. phone_number,
call_duration, call_date and email (this being the predefined email address the notification is getting sent to).
I now have the need to do this in ASP, I have the basics down, meaning I can setup a web form and have an email sent off when the button is clicked but I have no idea how to do what I need to here. Can someone please help me out or point me in the right
direction of setting up a page that just gets hit by our system on the backend, reads the variables and places them in the body of an email and sends it out?
Aug 05, 2010 05:19 PM|N_EvilScott|LINK
Please look at the following video:
QueryStrings are uniform among all browsers so as long as your previous place is looking for the standard querystring format then your in great shape.
i.e. (QueryString standard is
http://website.com?QueryString=Value&QueryString2=Value) Where the '?' signifies the beginning of a querystring segment, and you have multiple querystring parameters with their values seperated by the '&' symbol.
Aug 10, 2010 01:09 PM|domenicfz|LINK
I watched it and understand, our system hits a page after a call with a url that looks like this:
That part works fine when hitting the email_notification.php page which pulls the variables and sticks them in the body of an email and sends it off. I need to do the same thing in ASP, where that URL will hit a calls.aspx page and that page will then pull
the variables, stick them in the body of an email and sends it off.