找考题网-背景图
单项选择题

You are implementing an ASP.NET application that will use session state in out-of-proc mode. You add the following code.

You need to add an attribute to the Person class to ensure that you can save an instance to session state. 
Which attribute should you use?()

A.Bindable
B.DataObject
C.Serializable
D.DataContract

热门试题

单项选择题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?()

A.Replace line 05 with the following code segment. routes.MapRoute( "Default", "{controller}/{action}/{id}", New With {.controller = "Home", .action = "DetailsByUsername", .id = ""})
B.Replace line 05 with the following code segment. routes.MapRoute("Default", "{controller}/{action}/{username}", New With {.controller = "Home", .action = "DetailsByUsername", .username = ""}, New With {.username = "\w{3,20}"} )
C.At line 04, add the following code segment.routes.MapRoute( "Details byUsername""{username}", New With {.controller = "Home", .action = "DetailsByUsername"}, New With {.username = "\w{3,20}"})
D.At line 04, add the following code segment. routes.MapRoute( "Details by Username", "{id}",  New With {.controller = "Home", .action = "DetailsByUsername"}, New With {.id = "\w{3,20}"} )