毕业设计论文翻译材料.docx

上传人:b****3 文档编号:27471991 上传时间:2023-07-01 格式:DOCX 页数:13 大小:22.58KB
下载 相关 举报
毕业设计论文翻译材料.docx_第1页
第1页 / 共13页
毕业设计论文翻译材料.docx_第2页
第2页 / 共13页
毕业设计论文翻译材料.docx_第3页
第3页 / 共13页
毕业设计论文翻译材料.docx_第4页
第4页 / 共13页
毕业设计论文翻译材料.docx_第5页
第5页 / 共13页
点击查看更多>>
下载资源
资源描述

毕业设计论文翻译材料.docx

《毕业设计论文翻译材料.docx》由会员分享,可在线阅读,更多相关《毕业设计论文翻译材料.docx(13页珍藏版)》请在冰豆网上搜索。

毕业设计论文翻译材料.docx

毕业设计论文翻译材料

 

毕业设计(论文)翻译材料

 

学院:

专业:

班级:

学生姓名:

指导教师:

 

ASP.NETTechnique

1.BuildingASP.NETPages

ASP.NETandthe.NETFramework

ASP.NETispartofMicrosoft'soverall.NETframework,whichcontainsavastsetofprogrammingclassesdesignedtosatisfyanyconceivableprogrammingneed.Inthefollowingtwosections,youlearnhowASP.NETfitswithinthe.NETframework,andyoulearnaboutthelanguagesyoucanuseinyourASP.NETpages.

The.NETFrameworkClassLibrary

ImaginethatyouareMicrosoft.Imaginethatyouhavetosupportmultipleprogramminglanguages—suchasVisualBasic,JScript,andC++.Agreatdealofthefunctionalityoftheseprogramminglanguagesoverlaps.Forexample,foreachlanguage,youwouldhavetoincludemethodsforaccessingthefilesystem,workingwithdatabases,andmanipulatingstrings.

Furthermore,theselanguagescontainsimilarprogrammingconstructs.Everylanguage,forexample,canrepresentloopsandconditionals.EventhoughthesyntaxofaconditionalwritteninVisualBasicdiffersfromthesyntaxofaconditionalwritteninC++,theprogrammingfunctionisthesame.

Finally,mostprogramminglanguageshavesimilarvariabledatatypes.Inmostlanguages,youhavesomemeansofrepresentingstringsandintegers,forexample.Themaximumandminimumsizeofanintegermightdependonthelanguage,butthebasicdatatypeisthesame.

Maintainingallthisfunctionalityformultiplelanguagesrequiresalotofwork.Whykeepreinventingthewheel?

Wouldn'titbeeasiertocreateallthisfunctionalityonceanduseitforeverylanguage?

The.NETFrameworkClassLibrarydoesexactlythat.Itconsistsofavastsetofclassesdesignedtosatisfyanyconceivableprogrammingneed.Forexample,the.NETframeworkcontainsclassesforhandlingdatabaseaccess,workingwiththefilesystem,manipulatingtext,andgeneratinggraphics.Inaddition,itcontainsmorespecializedclassesforperformingtaskssuchasworkingwithregularexpressionsandhandlingnetworkprotocols.

The.NETframework,furthermore,containsclassesthatrepresentallthebasicvariabledatatypessuchasstrings,integers,bytes,characters,andarrays.

Mostimportantly,forpurposesofthisbook,the.NETFrameworkClassLibrarycontainsclassesforbuildingASP.NETpages.Youneedtounderstand,however,thatyoucanaccessanyofthe.NETframeworkclasseswhenyouarebuildingyourASP.NETpages.

UnderstandingNamespaces

Asyoumightguess,the.NETframeworkishuge.Itcontainsthousandsofclasses(over3,400).Fortunately,theclassesarenotsimplyjumbledtogether.Theclassesofthe.NETframeworkareorganizedintoahierarchyofnamespaces.

ASPClassicNote

InpreviousversionsofActiveServerPages,youhadaccesstoonlyfivestandardclasses(theResponse,Request,Session,Application,andServerobjects).ASP.NET,incontrast,providesyouwithaccesstoover3,400classes!

Anamespaceisalogicalgroupingofclasses.Forexample,alltheclassesthatrelatetoworkingwiththefilesystemaregatheredtogetherintotheSystem.IOnamespace.

Thenamespacesareorganizedintoahierarchy(alogicaltree).AttherootofthetreeistheSystemnamespace.Thisnamespacecontainsalltheclassesforthebasedatatypes,suchasstringsandarrays.Italsocontainsclassesforworkingwithrandomnumbersanddatesandtimes.

Youcanuniquelyidentifyanyclassinthe.NETframeworkbyusingthefullnamespaceoftheclass.

System.IO.File

System.IOreferstothenamespace,andFilereferstotheparticularclass.

StandardASP.NETNamespaces

TheclassescontainedinaselectnumberofnamespacesareavailableinyourASP.NETpagesbydefault.(Youmustexplicitlyimportothernamespaces.)ThesedefaultnamespacescontainclassesthatyouusemostofteninyourASP.NETapplications:

System—Containsallthebasedatatypesandotherusefulclassessuchasthoserelatedtogeneratingrandomnumbersandworkingwithdatesandtimes.

System.Collections—Containsclassesforworkingwithstandardcollectiontypessuchashashtables,andarraylists.

System.Collections.Specialized—Containsclassesthatrepresentspecializedcollectionssuchaslinkedlistsandstringcollections.

System.Configuration—Containsclassesforworkingwithconfigurationfiles(Web.configfiles).

System.Text—Containsclassesforencoding,decoding,andmanipulatingthecontentsofstrings.

System.Text.RegularExpressions—Containsexpressionmatchandreplaceoperations.

System.Web—ContainsthebasicclassesforworkingwiththeWorldWideWeb,includingclassesforrepresentingbrowserrequestsandserverresponses.

System.Web.Caching—Containsclassesusedforcachingthecontentofpagesandclassesforperformingcustomcachingoperations.

System.Web.Security—ContainsclassesforimplementingauthenticationandauthorizationsuchasFormsandPassportauthentication.

System.Web.SessionState—Containsclassesforimplementingsessionstate.

System.Web.UI—ContainsthebasicclassesusedinbuildingtheuserinterfaceofASP.NETpages.

System.Web.UI.HTMLControls—ContainstheclassesfortheHTMLcontrols.System.Web.UI.WebControls—ContainstheclassesfortheWebcontrols.

.NETFramework-CompatibleLanguages

Forpurposesofthisbook,youwillwritetheapplicationlogicforyourASP.NETpagesusingVisualBasicasyourprogramminglanguage.ItisthedefaultlanguageforASP.NETpages.AlthoughyousticktoVisualBasicinthisbook,youalsoneedtounderstandthatyoucancreateASP.NETpagesbyusinganylanguagethatsupportsthe.NETCommonLanguageRuntime.Outofthebox,thisincludesC#,JScript.NET,andtheManagedExtensionstoC++.classesforperformingregular

IntroducingASP.NETControls

ASP.NETcontrolsprovidethedynamicandinteractiveportionsoftheuserinterfaceforyourWebapplication.ThecontrolsrenderthecontentthattheusersofyourWebsiteactuallyseeandinteractwith.Forexample,youcanusecontrolstocreateHTMLformelements,interactivecalendars,androtatingbanneradvertisements.

ASP.NETcontrolscoexistpeacefullywithHTMLcontent.Typically,youcreatethestaticareasofyourWebpageswithnormalHTMLcontentandcreatethedynamicorinteractiveportionswithASP.NETcontrols.

ThebestwaytounderstandhowASP.NETcontrolsworkinanHTMLpageistolookatasimpleWebFormsPage.

AddingApplicationLogictoanASP.NETPage

ThesecondbuildingblockofanASP.NETpageistheapplicationlogic,whichistheactualprogrammingcodeinthepage.Youaddapplicationlogictoapagetohandlebothcontrolandpageevents.

IfauserclicksaButtoncontrolwithinanHTMLform,forexample,theButtoncontrolraisesanevent(theClickevent).Typically,youwanttoaddcodetothepagethatdoessomethinginresponsetothisevent.Forexample,whensomeoneclickstheButtoncontrol,youmightwanttosavetheformdatatoafileordatabase.

Controlsarenottheonlythingsthatcanraiseevents.AnASP.NETpageitselfraisesseveraleventseverytimeitisrequested.Forexample,wheneveryourequestapage,thepage'sLoadeventistriggered.YoucanaddapplicationlogictothepagethatexecuteswhenevertheLoadeventoccurs.

2.BuildingFormswithWebServerControls

BuildingSmartForms

YouuseseveralofthebasicWebcontrolstorepresentstandardHTMLformelementssuchasradiobuttons,textboxes,andlistboxes.YoucanusethesecontrolsinyourASP.NETpagestocreatetheuserinterfaceforyourWebapplication.ThefollowingsectionsprovidedetailedoverviewsandprogrammingsamplesforeachoftheseWebcontrols.

ControllingPageNavigation

Inthefollowingsections,youlearnhowtocontrolhowausermovesfromoneASP.NETpagetoanother.First,youlearnhowtosubmitanHTMLformtoanotherpageandretrieveforminformation.Next,youlearnhowtousetheRedirect()methodtoautomaticallytransferausertoanewpage.Finally,youlearnhowtolinkpagestogetherwiththeHyperLinkcontrol.

ApplyingFormattingtoControls

Inthefollowingsections,youlearnhowtomakemoreattractiveWebforms.First,youlookatanoverviewoftheformattingpropertiescommontoallWebcontrols;theyaretheformattingpropertiesofthebasecontrolclass.Next,youlearnhowtoapplyCascadingStyleSheetstylesandclassestoWebcontrols.

3.PerformingFormValidationwithValidationControls

UsingClient-sideValidation

Traditionally,Webdevelopershavefacedatoughchoicewhenaddingformvalidationlogictotheirpages.Youcanaddformvalidationroutinestoyourserver-sidecode,oryoucanaddthevalidationroutinestoyourclient-sidecode.

Theadvantageofwritingvalidationlogicinclient-sidecodeisthatyoucanprovideinstantfeedbacktoyourusers.Forexample,ifauserneglectstoenteravalueinarequired

formfield,youcaninstantlydisplayanerrormessagewithoutrequiringaroundtripbacktotheserver.

Peoplereallylikeclient-sidevalidation.Itlooksgreatandcreatesabetteroveralluserexperience.Theproblem,however,isthatitdoesnotworkwithallbrowsers.NotallbrowserssupportJavaScript,anddifferentversionsofbrowserssupportdifferentversionsofJavaScript,soclient-sidevalidationisneverguaranteedtowork.

Forthisreason,inthepast,manydevelopersdecidedtoaddalltheirformvalidationlogicexclusivelytoserver-sidecode.Becauseserver-sidecodefunctionscorrectlywithanybrowser,thiscourseofactionwassafer.

Fortunately,theValidationcontrolsdiscussedinthischapterdonotforceyoutomakethisdifficultchoice.TheValidationcontrolsautomaticallygeneratebothclient-sideandserver-sidecode.IfabrowseriscapableofsupportingJavaScript,client-sidevalidationscriptsareautomaticall

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 高中教育 > 小学教育

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1