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.

阿里云香港 16核32G 20M 999元/月

阿里云香港配置图提速啦是成立于2012年的十分老牌的一个商家这次给大家评测的是 阿里云香港 16核32G 20M 这款产品,单单说价格上就是十分的离谱原价8631元/月的现价只要 999元 而且还有个8折循环优惠。废话不多说直接进入正题。优惠时间 2021年8月20日-2021年9月20日 优惠码 wn789 8折优惠阿里云香港BGP专线 16核32G 10M带宽 优惠购买 399元购买链接阿里云...

星梦云:四川100G高防4H4G10M月付仅60元

星梦云怎么样?星梦云资质齐全,IDC/ISP均有,从星梦云这边租的服务器均可以备案,属于一手资源,高防机柜、大带宽、高防IP业务,一手整C IP段,四川电信,星梦云专注四川高防服务器,成都服务器,雅安服务器。星梦云目前夏日云服务器促销,四川100G高防4H4G10M月付仅60元;西南高防月付特价活动,续费同价,买到就是赚到!点击进入:星梦云官方网站地址1、成都电信年中活动机(成都电信优化线路,封锁...

DMIT(8.72美元)日本国际线路KVM月付8折起,年付5折

DMIT.io是成立于2018年的一家国外主机商,提供VPS主机和独立服务器租用,数据中心包括中国香港、美国洛杉矶和日本等,其中日本VPS是新上的节点,基于KVM架构,国际线路,1Gbps带宽,同时提供月付循环8折优惠码,或者年付一次性5折优惠码,优惠后最低每月8.72美元或者首年65.4美元起,支持使用PayPal或者支付宝等付款方式。下面列出部分日本VPS主机配置信息,价格以月付为例。CPU:...

registerstartupscript为你推荐
木马病毒木马病毒的区别网络明星网络明星是怎样成名的呢?如何又是网络明星呢?!!在线漏洞检测如果检测网站是否有漏洞?ghostxp3ghost xp sp3 和 windows xp3有啥区别flash导航条谁来帮我看看这样的flash导航条 下面的页面该怎么设计申请证书申请毕业证书iphone越狱后怎么恢复苹果越狱后如何恢复腾讯文章腾讯罗剑楠是何许人也?开机滚动条谁会调开机的滚动条怎么点亮qq空间图标QQ空间的图标怎么点亮
qq云存储 息壤备案 免费主机 网站保姆 ixwebhosting 租空间 建立邮箱 isp服务商 华为云盘 360云服务 七牛云存储 数据湾 privatetracker 九零网络 最新优惠 美国十大啦 alertpay 卡巴斯基免费版下载 卡巴斯基官方下载 中国最年轻博士 更多