CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 URL redirection

Print topic Send  topic

Author Message
Chris__T


Posts: 339
Posted: 05/30/2006, 11:41 AM

I'd like to go to a different page in an IF THEN condition.

If (condition = true) then go to URL A

else
go to URL B


what is the code to make this happen? I've tried response.redirect url and that doesn't seem to work.
View profile  Send private message
WKempees
Posted: 05/30/2006, 12:17 PM

Chris,

You have asked this more than once, correct?
In the Manuals http://docs.codecharge.com/studio3/html/ look at Redirect


Redirect = "destination"

Redirect = IIF(condition, "URL_A", "URL_B")

Walter

Chris__T


Posts: 339
Posted: 05/30/2006, 12:24 PM

Thanks Walter! I'll take a look at that .
View profile  Send private message
Chris_T
Posted: 05/31/2006, 11:40 AM

addendum to this question: I don't want to test this condition when i click a button. I want it to test the condition when the page loads. The page loads from a search button. The info from the search button checks to see if a textbox is empty. then the condition comes in. If empty go to URL_A, else URL_B. Would that be on a "before show", or a "after select" event?
wkempees


Posts: 1679
Posted: 06/01/2006, 7:06 AM

The Page's BeforeShow,would be the spot to check for any URLparms.

CCGetFromGet("theParameterOnTheURL","A_DefaultValuie)
A basic search form will post s_keyword=givensearchterm

IF ( CCGetFromGet("s_keyword", "") == "" )
Redirect = "URL_A";
ELSE
Redirect = "URL_B";

(syntax PhP style)
Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
Chris_T
Posted: 06/01/2006, 12:02 PM

cool Walter. Thanks. I'll try this out.
Chris_T
Posted: 06/05/2006, 9:31 AM

Doesn't seem to be working. Even if I do a stand alone Redirect in the before show event, it won't even go to the url i specify. I'll keep working on it though.
Chris_T
Posted: 06/05/2006, 11:51 AM

I figured it out. For some reason, Response.Redirect("URL") works.

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.