单项选择题
A.Add the following directive to TestPage.aspx. <%@ MasterType VirtualPath="~/TestMaster.master" %><%@ mastertype="" virtualpath="~/TestMaster.master">
B.Add the following directive to TestPage.aspx. <%@ PreviousPageType VirtualPath="~/TestMaster.master" %><%@ previouspagetype="" virtualpath="~/TestMaster.master">
C.Set the Strict attribute in the @ Master directive of the TestMaster.master page to true.
D.Set the Explicit attribute in the @ Master directive of the TestMaster.master page to true.%@>%@>
单项选择题 YouaredevelopinganASP.NETWebpagethatcontainsinputcontrols,validationcontrols,andabuttonnamedbtnSubmit.Thepagehasthefollowingcode-behind.01PublicClass_Default02InheritsSystem.Web.UI.Page0304ProtectedSubSaveToDatabase()0506EndSub0708ProtectedSubbtnSubmit_Click(ByValsenderAsObject,09ByValeAsEventArgs)HandlesbtnSubmit.Click1011EndSub1213EndClassYouneedtoensurethatalldatathatissubmittedpassesvalidationbeforethedataissavedinadatabase.Whatshouldyoudo?()
单项选择题 YoucreateanewASP.NETMVC2Webapplication.ThefollowingdefaultroutesarecreatedintheGlobal.asax.vbfile.01SharedSubRegisterRoutes(ByValroutesAsRouteCollection)0203routes.IgnoreRoute("{resource}.axd/{*pathInfo}")0405routes.MapRoute("Default","{controller}/{action}/{id}",NewWith{.controller="Home",.action="Index",.id=""})06EndSubYouimplementacontrollernamedHomeControllerthatincludesmethodswiththefollowingsignatures.FunctionIndex()AsActionResultFunctionDetails(ByValidAsInteger)AsActionResultFunctionDetailsByUsername(ByValusernameAsString)AsActionResultYouneedtoaddaroutetomeetthefollowingrequirements.ThedetailsforausermustbedisplayedwhenausernameisenteredasthepathbyinvokingtheDetailsByUsernameaction.Usernamescancontainalphanumericcharactersandunderscores,andcanbebetween3and20characterslong.Whatshouldyoudo?()
单项选择题 YouareimplementinganASP.NETMVC2application.IntheAreasfolder,youaddasubfoldernamedProducttocreateasingleprojectareA.YouaddfilesnamedProductController.vbandIndex.aspxtotheappropriatesubfolders.YouthenaddafilenamedRoute.vbtotheProductfolderthatcontainsthefollowingcode.01PublicClassRouteInheritsAreaRegistration0203PublicOverridesReadOnlyPropertyAreaNameAsString04Get05Return"product"06EndGet07EndProperty0809PublicOverridesSubRegisterArea(ByValcontextAsAreaRegistrationContext)1011context.MapRoute("product_default","product/{controller}/{action}/{id}",NewWith{.controller="Product",.action="Index",.id=""})1213EndSubEndClassWhenyouloadtheURLhttp:///product,youdiscoverthatthecorrectpageisnotreturned.Youneedtoensurethatthecorrectpageisreturned.Whatshouldyoudo?()