CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

MS SQL 2008 on ASP.NET Hosting



Zone: > NEWSGROUP > Asp.Net Forum > migration_to_asp.net.migrating_from_php_to_asp.net Tags:
Item Type: NewsGroup Date Entered: 9/2/2006 8:57:45 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 54 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
mohiga
Asp.Net User
Conditional Include - PHP to ASP?9/2/2006 8:57:45 PM

0/0

Hi everyone,

 Im new to ASP at the moment and have a problem. Basically, I normally program in PHP, but have been asked to make a site that works in ASP. Most of the code is fine, however i am having trouble "translating" one peice of code:

            <?php
                if ($page=="")
                {
                    require( "home.php");
                }
                if ($page!="")
                {
                    require( $page . ".php");
                }
            ?>

 THis is used in the homepage. However, links point to www.site.com/index.php?page=test in this format. Unless "page" is specified in the URL, it will include the file "home.php", otherwise it will include (in this case) test.php.
I can get the include ASP code ok, but it is just the conditional part that is bugging - equally, how would one make a link that would send a variable such as "page" (in the format previously shown ) in the URL?

 
Help much appreciated Smile

 

mohiga.


 

 

 

Connect
Asp.Net User
Re: Conditional Include - PHP to ASP?9/4/2006 11:57:12 PM

0/0

Are you talking about 'classic' ASP or ASP .NET? If the latter, which language are you using?

Generally in ASP .NET you don't include files. You write classes or user controls or use master pages. It's a totally different architecture, really.
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Macromedia Dreamweaver 8 with ASP, Coldfusion and PHP: Training from the Source Authors: Jeffrey Bardzell, Pages: 508, Published: 2005
Foundation Flex for Developers: Data-Driven Applications with PHP, ASP. Net, Coldfusion, and LCDs Authors: Sas Jacobs, Koen de Weggheleire, Pages: 545, Published: 2007
JavaServer Pages Authors: Hans Bergsten, Pages: 740, Published: 2003
Professional LAMP: Linux, Apache, MySQL, and PHP Web Development Authors: Jason Gerner, Elizabeth Naramore, Morgan Owens, Matt Warden, Pages: 379, Published: 2005
Programming PHP Authors: Rasmus Lerdorf, Kevin Tatroe, Peter MacIntyre, Pages: 521, Published: 2006
Building Web Sites All-in-One Desk Reference For Dummies: All-in-one Desk Reference for Dummies Authors: Doug Sahlin, Claudia Snell, Pages: 768, Published: 2006
CSS Hacks and Filters: Making Cascading Style Sheets Work Authors: Joseph W. Lowery, Pages: 266, Published: 2005
Macromedia Dreamweaver MX 2004 Web Application Recipes: Web Application Recipes Authors: Joseph W. Lowery, Eric Ott, Pages: 616, Published: 2003
Oracle Database 10g Express Edition PHP Web Programming Authors: Michael McLaughlin, Pages: 701, Published: 2006
Master Visually Dreamweaver CS3 and Flash CS3 Professional: Dreamweaver Cs3 and Flash Cs3 Professional Authors: Sherry Kinkoph, Sherry Kinkoph Gunter, Janet Valade, Pages: 665, Published: 2007

Web:
Conditional Include - PHP to ASP? - ASP.NET Forums NET » Migrating from PHP to ASP.NET » Conditional Include - PHP to ASP? ... Re: Conditional Include - PHP to ASP? ...
conditional file include? - ASP conditional file include? ASP. ... not display if include file has whitespace after last ?> Ron at Termolog dot com, PHP Development, 0, 07-12-2003 01:21 PM ...
Conditional Statements in ASP Sep 16, 2006 ... The net's largest PHP, CGI, Perl, JavaScript and ASP script ... can be the FIRST one to write a review for Conditional Statements in ASP. ...
Conditional html blocks - .NET ASP Nov 19, 2005 ... In scripting languages such as PHP and ColdFusion, it is easy to conditionally include a block of html using something like (pseudocode): ...
DELETED Conditional statements in PHP are used to perform different actions ... Supported technologies include XML Schema, DTD, Relax NG, XSLT, XPath, XQuery, CSS. ...
Conditional Statement in PHP [Archive] - kirupaForum [Archive] Conditional Statement in PHP Server-Side (PHP, SQL, ASP.NET, etc.) ... include '/ienavi.html';// take to correct page ...
Conditional Statements in ASP There are two types of conditional statements in ASP: if...then and select case. In this... ... How to Create CAPTCHA Protection using PHP and AJAX ...
PHP conditional redirect - Web Designers and Developers Zone ... PHP conditional redirect. I'm currently building a site using PHP, usually I work with ASP and so I'm needing to adjust to the different ways of doing ...
ASP: Conditional Statements VBScript has 2 conditional statement constructions, available for you to use in your ASP pages: If...then...else and Select Case. ...
If Else & ElseIF conditional program structure control in ASP If Else elseif and nested If conditional script control for managing program flow with ... SQL PHP HTML ASP JavaScript articles and free scripts to download ...

Videos:
django: Web Development for Perfectionists with Deadlines Google TechTalks April 26, 2006 Jacob Kaplan-Moss ABSTRACT Django is one of the premier web frameworks for Python, and is often compared ...




Search This Site:










some javascript functions to translate

mixing php and asp.net

convert php image generation to asp.net

is it possible in asp.net with ms-sql database ?

where to start...

asp controls not working

phpinfo for asp.net

password hashing php vs. vb.net (sha1() vs. hashpasswordforstoringinconfigfile)

php class vs. asp.net/c# class

php > asp

getting data from users

array of submitted form values

php compiler for .net - easy migration

the equivilant of $_session()

associated arrays => hashtable ?

getting started - fsockopen equivalents

how can i use arrays like $_post[] or $_get[] in asp.net ?

repeat string

php gurus - help me translate this to .net

coming from a php + java background.

conditional include - php to asp?

asp.net is too expensive to deploy

php -> asp transfer

migrate php to asp.net

from php to asp ,

retriving data from db and parsing

future of asp.net

include file?

asp.net info

cron job or timer in iis / asp.net?

  Privacy | Contact Us
All Times Are GMT