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.

湖北22元/月(昔日数据)云服务器,国内湖北十堰云服务器,首月6折

昔日数据怎么样?昔日数据新上了湖北十堰云服务器,湖北十堰市IDC数据中心 母鸡采用e5 2651v2 SSD MLC企业硬盘 rdid5阵列为数据护航 100G高防 超出防御峰值空路由2小时 不限制流量。目前,国内湖北十堰云服务器,首月6折火热销售限量30台价格低至22元/月。(注意:之前有个xrhost.cn也叫昔日数据,已经打不开了,一看网站LOGO和名称为同一家,有一定风险,所以尽量不要选择...

digital-vm:VPS低至$4/月,服务器$80/月,10Gbps超大带宽,不限流量,机房可选:日本新加坡美国英国西班牙荷兰挪威丹麦

digital-vm,这家注册在罗马尼亚的公司在国内应该有不少人比较熟悉了,主要提供VPS业务,最高10Gbps带宽,还不限制流量,而且还有日本、新加坡、美国洛杉矶、英国、西班牙、荷兰、挪威、丹麦这些可选数据中心。2020年,digital-vm新增了“独立服务器”业务,暂时只限“日本”、“新加坡”机房,最高也是支持10Gbps带宽... 官方网站:https://digital-vm.co...

易探云月付18元起,香港/美国/深圳/北京VPS,CN2、BGP等多线路

易探云怎么样?易探云是国内一家云计算服务商家,致力香港服务器、国内外服务器租用及托管等互联网业务,目前主要地区为运作香港BGP、香港CN2、广东、北京、深圳等地区。易探云服务器均选择当下热门线路,比如CN2 GIA、BGP线路、CN2线路等,所有云主机支持月付,并且首月优惠,年付优惠,优惠后香港沙田云服务器/独立ip/香港CN2线路,每月仅18元,188元/年。点击进入:易探云官方网站地址1、香港...

registerstartupscript为你推荐
赛我网赛我网(cyworld)怎么进不去?金山杀毒怎么样金山杀毒软件咋样?百度抢票浏览器百度浏览器怎么抢票?伪静态什么是伪静态开机滚动条开机滚动条要很长时间怎么解决?mate8价格华为mate8什么时候会降价bt封杀现在是全面封杀BT下载了吗?现在都找不到BT下载影片了云挂机云挂机每天2+元你提了吗?虚拟机软件下载谁有虚拟机软件的网址要好用的blogcn哪种博客更好...sina.baidu.blogcn还是.............?
yuming 长沙虚拟主机 备案域名 域名解析服务器 bluevm 双12活动 godaddy域名转出 godaddy优惠券 天猫双十一秒杀 亚洲小于500m 京东商城0元抢购 129邮箱 微软服务器操作系统 台湾谷歌 香港新世界中心 国外ip加速器 网站在线扫描 智能dns解析 lamp架构 服务器防御 更多