Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
IntroducingASP
Introducing ASP
Learning About ASP and ServerSide Programming
ASPisaWebserverscriptinglanguagefromMicrosoftusedforembeddingdynamic contentintoHTMLWebpages.ASPstandsforActiveServerPages. ASPisaserversidescriptinglanguage.WhatdistinguishesASPfromsomethinglike clientsideJavaScriptisthatthecodeisexecutedontheserver.Thismeansthattheserver executesyourscriptandtranslatesthecontenttoHTMLbeforesendingittoyourWeb browser.Alloftheheavyliftingandcomputingisdoneontheserver. WhenauserlooksatthesourcefortheWebpagecreatedbyyourASPfile,theyhaveno wayofknowingwhat'sgoingonbehindthescenesalltheyseeistheendresult.
Using ASP
ASPisautomaticallyenabledwithalloftheWindowshostingaccountsweoffer.Onceyou activateyourWindowshostingaccount,youcancreateanduploadPHPpages. Ifyou'renotfamiliarwithASPandnotinterestedinwritingyourownprogrammingcode, youcanstilluseASPonWebsitesbydownloadingexistingscriptsandapplicationsand installingthemonyoursite.ThereareamultitudeoffreeASPscriptsandapplications alreadywrittenanddistributedontheInternet. UsingASPandanMSSQLorAccessdatabase,youcancreaterobustWebsitesthat generatecontentandimagesdynamically. BelowisalistofjustsomeofthefeaturesyoucanaddtoyourWebsiteusingASP:
Blogs Guestbooks DiscussionForums MailFunctions PasswordGeneration DatabaseCommunication Auctions Calendars/Planners Games FileManagement Voting/PollingFeatures
Copyright2007
QuickStart
IntroducingASP
<html> <head> <title>ASPExample</title> </head> <body> <% response.write("EverybodylovesanASPscript!") %> </body> </html>
ToCreateYourFirstASPPage
1. Openyourtexteditor. 2. Typethefollowingcodeintoyourtexteditor:
Copyright2007
QuickStart
IntroducingASP
<html> <head> <title>ASP Test</title> </head> <body> <% response.write("Hello World!") %> </body> </html>
UseyourbrowsertoaccessthefilebytypinginyourWebaddressfollowedby /hello.asp/.Forexample,www.yourdomainnamehere.com/hello.asp.
Ifeverythingisconfiguredcorrectly,ASPwillconvertthecodeinbetweenthe<%and%> tagsanddisplaythetextHelloWorldinyourbrowser.
Copyright2007
QuickStart
IntroducingASP
ToUseASPtoGetInformationAboutYourSystem
1. Openyourtexteditor. 2. Typethefollowingcodeintoyourtexteditor:
<html> <head> <title>ASPInformation</title> </head> <body> <p><strong>Youarebrowsingthissitewith:</strong> <%Response.Write(Request.ServerVariables ("http_user_agent"))%></p> <p><strong>YourIPaddressis:</strong> <%Response.Write(Request.ServerVariables("remote_addr"))%></p> <p><strong>TheDNSlookupoftheIPaddressis:</strong> <%Response.Write(Request.ServerVariables("remote_host"))%></p> <p><strong>Themethodusedtocallthepage:</strong> <%Response.Write(Request.ServerVariables ("request_method"))%></p> <p><strong>Theserver'sdomainname:</strong> <%Response.Write(Request.ServerVariables("server_name"))%></p> <p><strong>Theserver'sport:</strong> <%Response.Write(Request.ServerVariables("server_port"))%></p> <p><strong>Theserver'ssoftware:</strong> <%Response.Write(Request.ServerVariables ("server_software"))%></p> </body> </html>
Copyright2007
QuickStart
IntroducingASP
Ifeverythingisconfiguredcorrectly,ASPwillconvertthecodeinbetweenthe<%and%> tagsanddisplayinformationaboutyourbrowserandserverinyourHTMLpage.5ngASP
AdditionalResources
ThereareanumberofplacesontheInternetwhereyoucanlearnmoreaboutASPand thedifferenttypesofASPWebapplicationsthatyoucanuseonyourWebsite.Herearea fewlinkstogetyoustarted: MicrosoftActiveServerPagesSite W3School'sASPTutorial ASPAlliance
Copyright2007