CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 conditional includes

Print topic Send  topic

Author Message
russew

Posts: 4
Posted: 10/11/2006, 6:58 AM

Is it possible to do conditional includes in Code Charge?

For example:

If case 1 then
include page 1
else
include page 2
end if

If this isn't possible, is there a way to accomplish the same result?


_________________
wjr
View profile  Send private message
wkempees


Posts: 1679
Posted: 10/11/2006, 2:40 PM

Code Charge or CodeChargeStudio?
What version 2 or 3?

If CCS 3+ then the answer is yes.
But pages should be read in an alternative way.
This is the scenarioo:
Yours :
Page1, BeforeShow does the testing and decides to include page2 or page3.
Mine:
Page2 and Page3 are includable pages.
Page1, includes both each on their own Panels (or surrouded by).
The Panels are sdet to Visibilty None (False).
In Page1 Before Show you do the testing and unhide the approprate Panel.
In my example maintenance on Page2 and 3 can be done elswhere (in Page2 and 3), as well as that they can be used on Page1 Page21 and so on while still maintaining single point of maintenance.

Walter

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
kirupa

Posts:
Posted: 10/12/2006, 4:15 AM

it is possible to conditional includes incode charge
View profile  Send private message
russew

Posts: 4
Posted: 10/12/2006, 5:34 AM

The answer I found yesterday was that "includes" are executed before variables are set in ASP therefore it is impossible to do conditional includes. This is not a limitation of codecharge, but it is a limitation of ASP and ASP.NET.

wkempees is correct in that you could include one page (not a conditional include) and use CCS 3.0 panels to hide and show the relevant items. This works unless you have 8 different complex pages that you wish to include. ie Calendar, images gallery, blog, events, news...

I believe conditional includes are a part of PHP so I am going to explore that as a solution. This is what I love about Codecharge. Core code change in minutes. Now if only they would include more ajax functionality....
_________________
wjr
View profile  Send private message

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.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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