单项选择题
You are troubleshooting an ASP.NET Web application. System administrators have recently expanded your web farm from one to two servers. Users are periodically reporting an error message about invalid view state. You need to fix the problem. What should you do?()
A.Set viewStateEncryptionMode to Auto in web.config on both servers.
B.Set the machineKey in machine.config to the same value on both servers.
C.Change the session state mode to SQLServer on both servers and ensure both servers use the same connection string.
D.Override the SavePageStateToPersistenceMedium and LoadPageStateFromPersistenceMedium methods in the page base class to serialize the view state to a local web server file.
相关考题
-
单项选择题
YoucreateanASP.NETpagenamedTestPage.aspxthatcontainsvalidationcontrols.Youneedtoverifythatallinputvaluessubmittedbytheuserhavebeenvalidatedbytestingthe Page.IsValidproperty.Whichpageeventshouldyouaddaneventhandlerto?()
A.Init
B.Load
C.PreInit
D.PreLoad -
单项选择题
YouaredevelopinganASP.NETWebapplication.Youcreateamasterpage.Themasterpagerequiresaregionwhereyoucanaddpage-specificcontentbyusingtheASP.NETpagedesigner.Youneedtoaddacontroltothemasterpagetodefinetheregion.Whichcontrolshouldyouadd?()
A.Content
B.ContentPlaceHolder
C.PlaceHolder
D.Substitution -
单项选择题
YouareimplementinganASP.NETapplicationthatusesdata-boundGridViewcontrolsinmultiplepages.YouaddJavaScriptcodetoperiodicallyupdatespecifictypesofdataitemsintheseGridViewcontrols.YouneedtoensurethattheJavaScriptcodecanlocatetheHTMLelementscreatedforeachrowintheseGridViewcontrols,withoutneedingtobechangedifthecontrolsaremovedfromonepagetoanother.Whatshouldyoudo?()
A.Replace the GridView control with a ListView control.
B.Set the ClientIDMode attribute to Predictable in the web.config file.
C.Set the ClientIDRowSuffix attribute of each unique GridView control to a different value.
D.Set the @ OutputCache directives VaryByControl attribute to the ID of the GridView control.
