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!

Problem sending QueryString with +

Status
Not open for further replies.

aspnetvbnetnerd

Programmer
Feb 3, 2008
31
0
0
SE
I am sending querystring with competens using + sign, when I want to retreive the the querystring "competence" the value is totaly wrong

Code:
<html>
<head>
</head>
<Body>
<%=Request.QueryString("Competence") %><br />
<%=Server.UrlEncode(Request.QueryString("Competence"))%>
<form action="ace.asp?competence=C#+sql server 2005+C++" method="post">
<input type="submit">

</form>
</Body>
</html>

The value that I getting is this
Code:
[COLOR=red]sql server 2005 C
sql+server+2005+C [/color]

What happens to my C# and C++ value

How can I solve this problem?
 
I did that.
I did that at Line 6 and the result that I am getting is the second line.
 
Code:
<html>
<head>
</head>
<Body>
<%=Request.QueryString("Competence") %><br />
<%=Server.UrlEncode(Request.QueryString("Competence"))%>
<form action="ace.asp?competence=[!]<% =Server.UrlEncode([/!]C#+sql server 2005+C++[!])%>[/!]" method="post">
<input type="submit">

</form>
</Body>
</html>

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Sorry. Forgot some quotes.

Code:
<html>
<head>
</head>
<Body>
<%=Request.QueryString("Competence") %><br />
<%=Server.UrlEncode(Request.QueryString("Competence"))%>
<form action="ace.asp?competence=[!]<% =Server.UrlEncode("[/!]C#+sql server 2005+C++[!]")%>[/!]" method="post">
<input type="submit">

</form>
</Body>
</html>

-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Oh sorry man I meant on the form action... not tryin' ta tell ya to do sumfin you already done did.
 
Thank you this works with asp.

My real problem is when using redirecting the user using javascript when using window.open

How can I solve this problem using Server.UrlEncode in javascript, is the any similar function I can use?
 
Though your question would be best posed in the Javascript forum, you can use escape to accomplish the encoding.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top