单项选择题
You are implementing an ASP.NET Web site that will be accessed by an international audience. The site contains global and local resources for display elements that must be translated into the language that is selected by the user. You need to ensure that the Label control named lblCompany displays text in the users selected language from the global resource file. Which control markup should you use?()
A.<asp:Label ID="lblCompany" runat="server" meta:resourcekey="lblCompany" />
B.<asp:Label ID="lblCompany" runat="server" Text="meta:lblCompany.Text" />
C.<asp:Label ID="lblCompany" runat="server" Text="<%$ Resources:lblCompanyText %>" />
D.<asp:Label ID="lblCompany" runat="server" Text="<%$ Resources:WebResources, lblCompanyText %>" />
相关考题
-
单项选择题
YouhavecreatedanASP.NETservercontrolnamedShoppingCartforusebyotherdevelopers.SomedevelopersreportthattheShoppingCartcontroldoesnotfunctionproperlywithViewStatedisabled.YouwanttoensurethatallinstancesoftheShoppingCartcontrolworkevenifViewStateisdisabled.Whatshouldyoudo?()
A.Require developers to set EnableViewStateMac to true.
B.Store state in ControlState instead of ViewState.
C.Serialize the state into an Application state entry called "MyControl".
D.Require developers to change the session state mode to SQLServer. -
单项选择题
YouarecreatinganASP.NETWebsite.ThesitehasamasterpagenamedCustom.master.Thecode-behindfileforCustom.mastercontainsthefollowingcodesegment.PartialPublicClassCustomInheritsSystem.Web.UI.MasterPagePublicPropertyRegionAsStringProtectedSubPage_Load(ByValsenderAsObject,ByValeAsSystem.EventArgs)HandlesMe.LoadEndSubEndClassYoucreateanewASP.NETpageandspecifyCustom.masterasitsmasterpage.YouaddaLabelcontrolnamedlblRegiontothenewpage.YouneedtodisplaythevalueofthemasterpagesRegionpropertyinlblRegion.Whatshouldyoudo?()
A.Add the following code segment to the Page_Load method of the page code-behind file. Dim custom As Custom = Me.Parent lblRegion.Text = custom.Region
B.Add the following code segment to the Page_Load method of the page code-behind file. Dim custom As Custom = Me.Master lblRegion.Text = custom.Region
C.Add the following code segment to the Page_Load method of the Custom.Master.vb code-behind file. Dim lblRegion As Label = Page.FindControl("lblRegion") lblRegion.Text = Me.Region
D.Add the following code segment to the Page_Load method of the Custom.Master.vb code-behind file. Dim lblRegion As Label = Master.FindControl("lblRegion") lblRegion.Text = Me.Region
