Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get 404 when passing query string with @ symbol

Status
Not open for further replies.

ciberperson

Programmer
Aug 31, 2000
29
CA
I am trying to pass 3 parameters in a query string. One of those parameters is an email address. I Server.UrlEncode each parameter but then I get a PNF (404 error). If I take the @ symbol out of the email, all works fine.

Using c# on .NET 3.5. Here's my code behind:
protected void GetQyStr(object sender, EventArgs e)
{

string stringParam = "someone@yahoo.com";
string URLEncoded = Server.UrlEncode(stringParams);
string stringURL = "PassThruQS.aspx?f=name&l=worker&e=" + URLEncoded;
// Response.Redirect parameter
Page.Response.Redirect(stringURL);
}

I have tried this multiple ways and all work as long as I don't use @ in the email. What is the proper way to pass the email parameter, redirect to my new page and then extract the email address correctly from the querystring? Thanks for help on such a simple (!) issue.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top