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和名称为同一家,有一定风险,所以尽量不要选择...

快云科技:香港沙田CN2云服务器低至29元/月起;美国高防弹性云/洛杉矶CUVIP低至33.6元/月起

快云科技怎么样?快云科技是一家成立于2020年的新起国内主机商,资质齐全 持有IDC ICP ISP等正规商家。云服务器网(yuntue.com)小编之前已经介绍过很多快云科技的香港及美国云服务器了,这次再介绍一下新的优惠方案。目前,香港云沙田CN2云服务器低至29元/月起;美国超防弹性云/洛杉矶CUVIP低至33.6元/月起。快云科技的云主机架构采用KVM虚拟化技术,全盘SSD硬盘,RAID10...

QQ防红跳转短网址生成网站源码(91she完整源码)

使用此源码可以生成QQ自动跳转到浏览器的短链接,无视QQ报毒,任意网址均可生成。新版特色:全新界面,网站背景图采用Bing随机壁纸支持生成多种短链接兼容电脑和手机页面生成网址记录功能,域名黑名单功能网站后台可管理数据安装说明:由于此版本增加了记录和黑名单功能,所以用到了数据库。安装方法为修改config.php里面的数据库信息,导入install.sql到数据库。...

registerstartupscript为你推荐
雅虎社区福建晋江社区是什么?邮箱打不开怎么办126邮箱打不开怎么办pwPW考试是指什么腾讯文章为什么最近腾讯网的文章评论都看不到硬盘人电脑对人有多大辐射?ios7固件下载ios 7及以上固件请在设备上点信任在哪点宕机人们说的宕机是什么意思ios系统iOS系统为什么那么好机械键盘轴机械键盘蓝轴有什么作用srv记录exchange 2010 自动发现需不需要srv记录
免费网站空间申请 南通服务器租用 万网域名解析 申请免费域名 唯品秀 香港托管 gomezpeer evssl证书 国外php空间 网站挂马检测工具 免费网站申请 北京双线机房 日本bb瘦 世界测速 傲盾官网 跟踪路由命令 中国linux 测速电信 测试网速命令 广州主机托管 更多