HTMLregisterstartupscript

registerstartupscript  时间:2021-02-21  阅读:()
RealWorldASP.
NETBestPracticesFARHANMUHAMMADANDMATTMILNERApressTMRealWorldASP.
NETBestPracticesCopyright2003byFarhanMuhammadandMattMilnerOriginallypublishedbyApressin2003Allrightsreserved.
Nopartofthisworkmaybereproducedortransmittedinanyformorbyanymeans,electronicormechanical,includingphotocopying,recording,orbyanyinformationstorageorretrievalsystem,withoutthepriorwrittenpermissionofthecopyrightownerandthepublisher.
ISBN978-1-59059-100-0ISBN978-1-4302-0769-6(eBook)DOI10.
1007/978-1-4302-0769-6Trademarkednamesmayappearinthisbook.
Ratherthanuseatrademarksymbolwitheveryoccurrenceofatrademarkedname,weusethenamesonlyinaneditorialfashionandtothebenefitofthetrademarkowner,withnointentionofinfringementofthetrademark.
TechnicalReviewer:ScottStabbertEditorialDirectors:DanAppleman,GaryCornell,SimonHayes,MartinStreicher,KarenWatterson,JohnZukowskiAssistantPublisher:GraceWongProjectManager:TracyBrownCollinsDevelopmentEditor:AmiKnoxCopyEditor:KristenImlerCompositorandProofreader:KineticPublishingServices,LLCIndexer:LynnArmstrongCoverDesigner:KurtKramesProductionManager:KariBrooksManufacturingManager:TomDebolskiTheinformationinthisbookisdistributedonan"asis"basis,withoutwarranty.
Althougheveryprecautionhasbeentakeninthepreparationofthiswork,neithertheauthor(s)norApressshallhaveanyliabilitytoanypersonorentitywithrespecttoanylossordamagecausedorallegedtobecauseddirectlyorindirectlybytheinformationcontainedinthiswork.
Iwouldliketodedicatethisbooktomylovelywife,Luna,whosecontinuoussupportandencouragementmadethisbookpossible.
Iwouldalsoliketodedicatethisbooktomyparents,whotaughtmetodomybestineverythingIstart.
-FarhanMuhammadIwouldliketodedicatethisbooktomywife,Kristen,forthepatiencesheexhibitsaboutthemanyhoursspentinfrontofthecomputerandtheunlimitedamountofsupportsheprovidesforallmyendeavors.
IwouldnotbewhereIamwithouther.
-MattMilnerContentsataGlanceAbouttheAuthorxiAbouttheTechnicalReviewerxiiIntroductionxiiiChapter1Chapter2Chapter3Chapter4Chapter5Chapter6Chapter7Chapter8TheAgeofASP.
NET1Cache,Session,andViewState11Client-SideJavaScript:Oh,WhatFun!
51HandlingDataEffectively71UsingASP.
NETtoManageLists109UserControlsandServerControls137RemotingandWebServices161ConfiguringASP.
NETApplications179Index203vContentsAbouttheAuthorsxiAbouttheTechnicalReviewerxiiIntroductionxiiiChapter1TheAgeofASP.
NET.
1TheConceptofCodeBehind:SeparatingFactfromFiction1UsingInheritanceinCodeBehind5EventWiring8StayingAwayfromtheInitializeComponentMethod9Summary10Chapter2Cache,Session,andViewState.
11BeMindfuloftheCacheI11CacheProsandCons11PerformanceTestingwithDataCaching13WhenGoodCacheGoesBad19It'sStillTooSlow!
22RefreshingCachedData23ExtractingDatafromaDatabaseandSavingItintoanXMLFile24ExpiringCache27TheCacheltemRemovedCallbackDelegate27UnderstandingtheCacheDependencyClass29LosingCachedInformationWhenRestartingtheApplication30TheScalabilityIssuewithCachedObjects30Thrbo-ChargingwithOutputCaching31DecidingWhethertoMaintainViewState36ViewState:BehindtheScenes38UnderstandingtheSessionObject42In-ProcessSession43StateServer43SQLServerSession43PerformanceTestingtheSessionObject44SummarysoviiContentsChapter3Client-SideJavaScript:Oh,WhatFun!
51CapturingEventsRaisedbyHTMLControlswithJavaScript52ServerControlAttributes53JavaScriptinASP.
NET:AProblematicSolution54DynamicallyGeneratingJavaScriptCode55UsingtheRegisterArrayDeclarationMethod56UsingtheRegisterClientScriptBlockMethod62UsingtheRegisterStartupScriptMethod65UsingtheRegisterOnSubmitStatementMethod68RemovingJavaScriptCodeProgrammatically69Summary69Chapter4HandlingDataEffectively71HandlingDatabyUsingDataSet71AnInherentProblemwithDataSet71UsingtheRawDataSettoCreateaVendorManagementSystem72HandlingDatabyUsingBusinessObjects:ABetterApproach76MethodsoftheCustomersClass79AddingBusinessRulestotheCustomersClass80HandlingDatabyUsingStronglyTypedCollections87GettingtoKnowtheCollectionBaseClass87MakingCustomerCollectionStronglyJYped90UsingaStronglyJYpedCollectionwithASP.
NETServerControls95TheMagicIsStillwiththe!
ListInterface98AddingaSearchMechanismtotheStronglyJYpedCollection98AddingRowStateCapabilitytotheStronglyJYpedCollection100ProvidingtheAbilitytoSorttheStronglyJYpedCollection104Summary107Chapter5UsingASP.
NETtoManageLists109DataBindingPerformanceDifferences109DataBindingPerformanceoftheDataGridControl110DataBindingPerformanceoftheDataListControl113DataBindingPerformanceoftheRepeaterControl116viiiContentsDataBindingTechniquesandTheirEffects120UsinganInlineFormatExpressionforDataBinding120UsinganEventHandlerforDataBinding122UsingMemberMethodsforDataBinding128UsingUserControlsEffectively132Summary136Chapter6UserControlsandServerControls.
137ChoosingaControlType137WorkingwithUserControls137BenefitsofPartial-PageCaching138WorkingwithServerControls141UserControlsvs.
ServerControls142BestPracticeswithUserControls143ExposingDatatoSubclasses,Containers,andSiblings143UsingEventstoCommunicateBetweenControls146SupportingTemplateswithUserControls149DynamicallyLoadingUserControls152BestPracticeswithServerControls153RaisingandHandlingEventsinServerControls153DesignTimeExperiencewithServerControls154AdditionalControlBestPractices155UsingViewStateSparinglybutEffectively155UsingClient-SideScriptwithControls156IndicatingtheScriptFileVersion157Summary160Chapter1RemotingandWebServices161RemotingOverview162Transport162SerializationFormat162ServerHost162Activation162StateManagement163WebServicesOverview163TellMeAlready!
WhenShouldIUseOneortheOther163BestPracticesThatAreCommontoRemotingandWebServices164SecuringYourRemoteCommunication165Performance166ixContentsRemotingBestPractices169ManagingTypesandInterfaces170WebServicesBestPractices174ManagingWSDLontheServerandServiceLocationsontheClient174Summary177Chapter8ConfiguringASP.
NETApplications179UnderstandingtheXMLConfigurationSystem179IdentifyingConfigurationSectionsandHandlers181LeveragingtheBuilt-InConfigurationHandlers185User-orEnvironment-SpecificSettings186ApplicationDomainsandAutomaticReloadingofConfigurationSettings190CascadingConfiguration191CreatingCustomConfigurationSectionHandlers197Summary201Index203XAbouttheAuthorsFARHANMUHAMMADistheChiefArchitectatILMProfessionalServices.
Heisatechnologyenthu-siastandhasbeenanevangelistforthe.
NETtechnologysinceitsinception.
Heleadsthe1\vinCities.
NETUserGroup,a400-member-strongcommunitythatfocusesonsharing.
NETknowl-edgeamongitsmembers.
HesitsontheboardofdirectorsfortheInternational.
NETAssociation(INETA),whereheisresponsiblefordevelopingstrategiesforsupporting.
NET-focusedcommuni-tiesineverycorneroftheworld.
HealsoleadsINETA'sSpeakersBureau,averysuccessfulpro-gramthatconnectsusergroupsthroughouttheU.
S.
withtop-notch.
NETexperts.
FarhanhoststheExecutive.
NETseminaronaregularbasis,whereexec-utivesareeducatedontheshort-andlong-termimpactofthe.
NETtechnologyontheirbusinesses.
HehasamastersdegreeinsoftwareengineeringfromtheUniversityofMinnesota.
MATTMILNERisaconsultantinMinneapolis,wherehedesignsanddevelops.
NETapplications.
HefocusesonsolvingbusinessproblemsbyusingMicrosofttechnologiesandisenthusiasticabout.
NET'scapabilitiesforbuildingenterpriseclassapplications.
Inadditiontohisworkwithclients,Mattenjoyshelpingotherslearnabout.
NET,whichiswhyhehascontributedtoseveralotherbooksandarticleson.
NET,andisanactivepartic-ipantandpresenterinthelocal.
NETusergroup.
xixiiAbouttheTechnicalReviewerSCOTTSTABBERTisaProgramManageratMicrosoft.
HehasbeenaleadfortheASPdevelopersupportteams,writtenandconductedtrainingforASP.
NETandWebservicesforMicrosoftaroundtheworld,andiscurrentlyatechnicalresourceforpartnersthatareimplementingMicrosoft's.
NETPassportandMSNAlertsservices.
ScottisanativeofRedmond,WA,andusedtolaunchrocketsinthebigemptyfieldwhereMicrosoftnowsits.
IntroductionWEHAVEBEENUSINGtheASP.
NETframeworkactivelysinceitsearlyinfancy(morethanayearbeforeofficialrelease)toprogrambusinesssolutionsforcor-porateAmerica.
Justlikemostpeople,westartedbypurchasingabunchofbooksandtriedtousethemtoabsorbasmuchknowledgeaswepossiblycould.
Itdidn'ttaketoolongforustorealizethatnoneofthosebooksgaveuswhatwereallyneeded.
Whatwereallyneededwaswisdom(notknowledge)onhowtousetheframeworkproperly-whattodo,whatnottodo,whythingsarethewaytheyare,andwhyASP.
NETisnotthebestthingsinceslicedbread.
Knowledgeisoverrated.
Itcanevenbeaplague,thekindthatcaneatyourskillsfromtheinside.
Awisemanoncesaid,don'tgivemetheknowledgeofahundredtoolstodotenthings;instead,showmetenwaystodoahundredthingsbetter.
Thepointwearetryingtomakeisthis:Itisofhigherimportanceforallofustolearntouseourtoolsappropriately,byleveragingotherpeople'swisdom.
Thedepthoftheknowledgewillcomeintime.
Whatweallneedcurrentlyistofocusonnotmakingrookiemistakes.
Thereisnoshameinfailure.
Wearenotagainstfailure.
Infact,weacquiremostofourwisdombymakingmistakesandlaterrectifyingthosemistakes.
However,whileweworkforotherindividualsorcorporations,itisourresponsibilitytomakefewermistakesbylearningfromotherpeople'sexperiences.
Thisbookisalsofullofouropinions.
Wefiguredthatifyouspendyourmoneybuyingourbook,youdeservetoknowwhatwereallythink.
Feelfreetodisagreewithusandevenletusknowwhyyoudo.
ThisbookshowsbestpracticesandsomecautionsrelatedtovariousareasoftheASP.
NETframework.
Westartthisbookbyadmiringthecode-behindpro-grammingmodel,arguablyoneofthebestfeaturesthatASP.
NETprovides.
Weareinlovewiththecode-behindstyleofWebprogramming.
Infact,itwasthisparticularfeaturethatinitiallyattractedbothofustowardexploringtherestofASP.
NETframework.
Afteradmiringthecode-behindstyleofprogramming,wemoveontoChapter2,wherewediscusswaystostoredatainmemorysothatwecanpro-videmuch-neededrelieftothedatabaseservers.
Inparticular,wespendmuchtimediscussingvariouscachingmechanismsandconductaseriesofperfor-manceteststodiscussbestpractices.
Afterdiscussingcachingmechanisms,westartonbestpracticesrelatedtosessionmanagement.
Agooddiscussiononcachingwouldn'tbecompletewithoutdelvingintoadiscussiononviewstate,andweclosethischapterbyshowingvariousissuesrelatedtoviewstateandhowtobestuseittoouradvantage.
xiiiIntroductionx:ivOneofourpetpeeveswith.
NETisitssupportofclientsideJavaScript,orlackthereof.
WededicatedallofChapter3todiscussingJavaScriptwhileshow-ingbestpractices,aswellasahealthydoseofcautions.
Abestpracticesbookwouldn'tbecompletewithoutadiscussionondatamanagement,soinChapter4,weshowbestpracticesrelatedtousingADO.
NET.
Wehavefoundmanynovice.
NETprogrammersusingtheDataSetobjectexten-sivelyandfeltthatweshouldeducateourreadersonother,moreadvancedmechanisms.
ThoughtheDataSetobjectprovidesmanyusefulfeatures,italsocomeswithaprice.
SuchshortfallsencouragedustousethischaptertocompareandcontrasttheDataSetobjectwithothermechanisms.
WefeelthatwewereextremelyluckytobeconsultantsduringtheearlydaysofASP.
NETtechnology.
Itgaveusopportunitiestoworkcloselywithmanyearlyadoptersandlearnaboutthecommonmistakesmostnoviceprogrammersmade.
OnesuchmistakewasusingtheDataGridWebservercontrolforalllistmanagementneeds.
AswiththeDataSetobject,wefeelthattheDataGridcon-trolisoverused.
Sure,itissimpleandeasytouseandcanbeconfiguredvisually,butasamuchheaviercontrol,itcausesmanyperformanceandscalabilityprob-lems.
Wedon'tdiscourageyoufromusingthiscontrol,butwewantedtodedicateChapter5todiscussinglistmanagementbestpractices.
Programmersoftenaskusaboutthedifferencebetweenusercontrolsandservercontrols.
ItcanbedifficulttodeterminewhichmechanismtousewhiledevelopingreusableWebcontrolsforyourprojects.
TheASP.
NETframeworkcansometimesbealittleambiguous;itprovidesmultiplewaysinwhichtoaccom-plishthesamepurposewithsubtledifferencesineachway.
WededicatedChapter6todiscussingthedifferencebetweenthesetwowaysofcreatingWebcontrolsandshowingyouthebestpracticesrelatedtoeachmechanism.
Notamonthgoesbywhenwedon'tseeatleastoneexampleofnovice.
NETprogrammersusingWebservicesfordistributedprogrammingwhenremotingwouldbeabetteralternative.
WefeltthatthesheervolumeofsuchclearmisuseofWebserviceswarrantedachapterofitsown.
Hence,Chapter7focusesentirelyoncomparingthedifferencesbetweenremotingandWebservicesandshowingbestpracticesforeachapproach.
ASP.
NETintroducesaninnovativemechanismtoconfigureWebappli-cations:theweb.
configfile.
Chapter8focusesoneducatingreadersonbestpracticesforusingtheweb.
configfile,includingcreatingcustomXML-basedconfigurationsections.
ASP.
NETisawonderfulnewenablingtechnologythatallowsustocreatebusinesssolutionsmuchmoreeffectivelythaneverbefore.
However,thereismuchroomforimprovement.
Youwon'toftenseethepotholesandpitfallsrelatedtothesetechnologiessimplybyreadingthebooks.
Instead,youmustexperiencethembysheddingsweatandblood.
(Okay,notblood!
)Wehopethisbookhelpsyou,thereader,avoidsuchroadblocksandfindeasierwaysasyoubecomeaccustomedtoASP.
NET.

UCloud:美国云服务器,洛杉矶节点大促,低至7元起/1个月

ucloud美国云服务器怎么样?ucloud是国内知名云计算品牌服务商家,目前推出全球多地机房的海外云服务器。UCloud主打的优势是海外多机房,目前正在进行的2021全球大促活动参与促销的云服务器机房就多达18个。UCloud新一代旗舰产品快杰云服务器已上线洛杉矶节点,覆盖北美和亚太地区,火热促销中, 首月低至7元,轻松体验具备优秀性能与极高性价比的快杰云服务器。点击进入:ucloud美国洛杉矶...

搬瓦工香港 PCCW 机房已免费迁移升级至香港 CN2 GIA 机房

搬瓦工最新优惠码优惠码:BWH3HYATVBJW,节约6.58%,全场通用!搬瓦工关闭香港 PCCW 机房通知下面提炼一下邮件的关键信息,原文在最后面。香港 CN2 GIA 机房自从 2020 年上线以来,网络性能大幅提升,所有新订单都默认部署在香港 CN2 GIA 机房;目前可以免费迁移到香港 CN2 GIA 机房,在 KiwiVM 控制面板选择 HKHK_8 机房进行迁移即可,迁移会改变 IP...

金山云:618年中促销,企业云服务器2核4G仅401.28元/年,827.64元/3年

金山云618年中促销活动正在进行中!金山云针对企业级新用户优惠力度比普通个人用户优惠力度要大,所以我们也是推荐企业新用户身份购买金山云企业级云服务器,尽量购买3年配置的,而不是限时秒杀活动中1年的机型。企业级用户购买金山云服务器推荐企业专区:云服务器N3 2核4G云服务器,1-5M带宽,827.64元/3年,性价比高,性能稳定!点击进入:金山云618年中促销活动目前,金山云基础型E1云服务器2核4...

registerstartupscript为你推荐
263邮箱263企业邮箱怎么样?外网和内网什么是内网,和外网有什么区别简体翻译成繁体有什么将简体中文翻译成繁体中文的网站啊中国论坛大全中国十大网站是?百度抢票浏览器猎豹浏览器,360抢票,百度卫士抢票哪个抢票工具好?bluestacksBluestacks安卓模拟器是什么机型的?伪静态什么是伪静态显卡温度多少正常电脑显卡温度多少正常?中小企业信息化中小企业如何进行企业信息化规划iphone越狱后怎么恢复iPhone越狱后怎么恢复?
网站域名空间 网址域名注册 北京租服务器 免费试用vps 浙江vps 美国独立服务器 分销主机 namecheap googleapps 免备案空间 gomezpeer 好看的桌面背景大图 debian6 免费博客空间 全能主机 新家坡 泉州移动 福建铁通 酷番云 免费mysql数据库 更多