外文翻译毕业设计题目:基于ASP.NET的物业管理系统开发原文1:ASP.NET2.0WebPagesandWebControls译文1:ASP.NET2.0网页和Web控件原文2:TheRoleofGlobal.asaxFile译文2:Global.asax文件的作用原文1ASP.NET2.0WebPagesandWebControlsUntilnow,alloftheexampleapplicationsinthistexthavefocusedonconsole-basedandWindowsFormsfrontends.Inthischapterandthenext,you’llexplorehowthe.NETplatformfacilitatestheconstructionofbrowser-basedpresentationlayers.Tobegin,you’llquicklyreviewanumberofkeyweb-centricconcepts(HTTP,HTML,client-side,andserver-sidescript)andtheroleofthewebserver(includingtheASP.NETdevelopmentserver,WebDev.WebServer.exe).Withthiswebprimeroutoftheway,theremainderofthischapterconcentratesonthecompositionofASP.NET(includingtheenhancedcode-behindmodel)andhowtoworkwithASP.NETwebcontrols.Asyouwillsee,ASP.NET2.0providesanumberofnewwebcontrols,anew“masterpage”model,andvariouscustomizationtechniques.TheRoleofHTTPWebapplicationsareverydifferentanimalsfromtraditionaldesktopapplications(tosaytheleast).Thefirstobviousdifferenceisthataproduction-levelwebapplicationwillalwaysinvolveatleasttwonetworkedmachines(ofcourse,duringdevelopmentitisentirelypossibletohaveasinglemachineplaytheroleofbothclientandserver).Giventhisfact,themachinesinquestionmustagreeuponaparticularwireprotocoltodeterminehowtosendandreceivedata.ThewireprotocolthatconnectsthecomputersinquestionistheHypertextTransferProtocol(HTTP).Whenaclientmachinelaunchesawebbrowser(suchasNetscapeNavigator,MozillaFirefox,orMicrosoftInternetExplorer),anHTTPrequestismadetoaccessaparticularresource(suchasan*.aspxor*.htmfile)ontheremoteservermachine.HTTPisatext-basedprotocolthatisbuiltuponastandardrequest/responseparadigm.Forexample,ifyounavigateto(DNS)thatconvertstheregisteredURLintoafour-part,32-bitnumericalvalue(akaanIPaddress).Atthispoint,thebrowseropensasocketconnection(typicallyviaport80)andsendstheHTTPrequestforthedefaultpageatthe(suchasvalueswithinatextbox)inordertoformataproperHTTPresponse.Webprogrammersmayleverageanynumberoftechnologies(CGI,ASP,ASP.NET,Javaservlets,etc.)todynamicallygeneratethecontenttobeemittedintotheHTTPresponse.Atthispoint,theclient-sidebrowserrenderstheHTMLemittedfromthewebserver.AnotheraspectofwebdevelopmentthatismarkedlydifferentfromtraditionaldesktopprogrammingisthefactthatHTTPisanessentiallystatelesswireprotocol.Assoonasthewebserveremitsaresponsetotheclient,everythingaboutthepreviousinteractionisforgotten.Therefore,asawebdeveloper,itisuptoyoutakespecificstepsto“remember”information(suchasitemsinashoppingcart)abouttheclientswhoarecurrentlyloggedontoyoursite.Asyouwillseeinthenextchapter,ASP.NETprovidesnumerouswaystohandlestate,manyofwhicharecommonplacetoanywebplatform(sessionvariables,cookies,andapplicationvariables)aswellassomenewtechniques(viewstate,controlstate,andthecache).UnderstandingWebApplicationsandWebServersAwebapplicationcanbeunderstoodasacollectionoffiles(*.htm,*.asp,*.aspx,imagefiles,etc.)andrelatedcomponents(suchasa.NETcodelibrary)storedwithinaparticularsetofdirectoriesonagivenwebserver.AsshowninChapter24,webapplicationshaveaspecificlifecycleandprovidenumerousevents(suchasinitialstartuporfinalshutdown)thatyoucanhookinto.Awebserverisasoftwareproductinchargeofhostingyourwebapplications,andittypicallyprovidesanumberofrelatedservicessuchasintegratedsecurity,FileTransferProtocol(FTP)support,mailexchangeservices,andsoforth.InternetInformationServer(IIS)isMicrosoft’senterprise-levelwebserverproduct,andasyouwouldguess,ithasintrinsicsupportforclassicASPaswellasASP.NETwebapplications.WhenyoubuildASP.NETwebapplications,youwilloftenneedtointeractwithIIS.Beaware,however,thatIISisnotautomaticallyselectedwhenyouinstalltheWindowsServer2003orWindowsXPProfessionalEdition(youcan’tinstallIISontheHomeeditionsofWindows).Therefore,dependingontheconfigurationofyourdevelopmentmachine,youmayberequiredtomanuallyinstallIISbeforeproceedingthroughthischapter.Todoso,simplyaccesstheAdd/RemoveProgramappletfromtheControlPanelfolderandselectAdd/RemoveWindowsComponents.WorkingwithIISVirtualDirectoriesAsingleIISinstallationisabletohostnumerouswebapplications,eachofwhichresidesinavirtualdirectory.Eachvirtualdirectoryismappedtoaphysicaldirectoryonthelocalharddrive.Therefore,ifyoucreateanewvirtualdirectorynamedCarsRUs,theoutsideworldcannavigatetothissiteusingaURLsuchas(assumingyoursite’sIPaddresshasbeenregisteredwiththeworldatlarge).Underthehood,thevirtualdirectorymapstoaphysicalrootdirectorysuchasC:\inetpub\