Avatar of Seven price
Seven priceFlag for United States of America

asked on 

passing query string id

I have a button that uses Response.Redirect("~/ord.aspx?s=/profdams/sale.aspx?=(id)")

but I need to pass the query string id to the next page like.
ord.aspx?s=/profdams/sale.aspx?id=41445

Not sure to pass this dynamically any ideas experts
.NET Programming

Avatar of undefined
Last Comment
dirq
ASKER CERTIFIED SOLUTION
Avatar of dirq
dirq
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of dirq
dirq
Flag of United States of America image

I think I missed that your trying to send a url in the querystring as a parameter.  Is that right?  Then you need to do something like Server.UrlEncode to make sure the characters are URL Encoded.
Avatar of Seven price
Seven price
Flag of United States of America image

ASKER

i figured it out like
id=" + (Request.QueryString("id")))
Avatar of Seven price
Seven price
Flag of United States of America image

ASKER

I just looked and you had basically almost the same thing so i will give you the credit for answering thanks.
Avatar of dirq
dirq
Flag of United States of America image

Just make sure you clean the querystring before you display it on the page otherwise you're open to cross-site scripting attacks.
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo