Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Old 05-07-2007, 09:28 PM ASP Parameters
Novice Talker

Posts: 12
Trades: 0
Hi all.

I have a simple redirect page that I am using to redirect users. The problem is, this redirect adds a parameter (?from=Somewhere) to the url of the page the user is being redirected to. Now the problem occours when the page they are being redirected to already has a parameter in which case the end result looks something like this (?NewsID=44?from=WhereTheUserCameFrom). Is there any way to check and see if there is already a perameter in the redirect url and if so change the (?from=Somewhere to &from=Somewhere)?

Thanks.
MIDNIGHTBANDIT9 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-08-2007, 02:38 AM Re: ASP Parameters
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
Code:
If InStr (Redirect_URL, "?") > 0 then
     Redirect_URL = Redirect_URL & "&from=WhereTheUserCameFrom"
else
     Redirect_URL = Redirect_URL & "?from=WhereTheUserCameFrom"
end if
Replace Redirect_URL as appropriate.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)

Last edited by ADAM Web Design; 05-08-2007 at 02:40 AM..
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 05-08-2007, 07:24 PM Re: ASP Parameters
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
Trades: 0
You could take a different approach and stick the URL in a session variable. That would solve this problem, and I'm not sure if you're concerned about search engines, but if you are, cleaner URLs are a good idea. Finally, session variables are stored on the server, which has a cost, but a trade-off is that they're much harder to manipulate. I don't know if this is a benefit in your situation or not, but it's worth considering...
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 05-14-2007, 03:23 PM Re: ASP Parameters
Experienced Talker

Posts: 42
Trades: 2
hmmmmm :O
Vairo is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to ASP Parameters
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.59660 seconds with 12 queries