You are developing an ASP.NET Web page. The page contains the following markup. The pages code-behind file includes the following code segment. You need to get a reference to the Image named img. Which code segment should you add at line 06?()
A.Image img = (Image)Page.FindControl("img"); B.Image img = (Image)e.Row.FindControl("img"); C.Image img = (Image)gvModels.FindControl("img"); D.Image img = (Image)Page.Form.FindControl("img");
单项选择题You are implementing an ASP.NET Web site that uses a custom server control named Task. Task is defined as shown in the following list. Class name: Task Namespace: DevControls Assembly: TestServerControl.dll Base class: System.Web.UI.WebControls.WebControl You copy TestServerControl.dll to the Web sites Bin folder. You need to allow the Task control to be declaratively used on site pages that do not contain an explicit @ Register directive. Which configuration should you add to the web.config file?()
A.<appSettings> <add key="Dev:Task" value="DevControls, DevControls.Task"/> </appSettings> B.<compilation targetFramework="4.0" explicit="false"> <assemblies> <add assembly="TestServerControl" /> </assemblies> </compilation> C.<pages> <controls> <add assembly="TestServerControl" namespace="DevControls" tagPrefix="Dev"/> </controls> </pages> D.<pages> <tagMapping> <add tagType="System.Web.UI.WebControls.WebControl" mappedTagType="DevControls </tagMapping> </pages>
单项选择题YouaredevelopinganASP.NETWebpage.ThepageincludesaListinstance.YouaddaFormViewcontroltodisplayasingleProductfromthislist.YouneedtobindthelisttotheFormViewcontrol.WhichFormViewpropertyshouldyousetinthecode-behindfile?()
A.DataSource B.DataSourceID C.DataKeyNames D.DataMember
单项选择题Gridview:Howtochangetheimageofanimagecontrolplaceineachrowinagridview:()
A.ItemDataBound B.Init C.Prerender D.<something I don‟t remember>
单项选择题YouaredevelopinganASP.NETWebpage.Youaddadata-boundGridViewcontrol.TheGridViewcontainsaTemplateFieldthatincludesaDropDownList.YousettheGridViewsClientIDModepropertytoStatic,andyousettheClientIDRowSuffixpropertytoProductID.YouneedtobeabletoreferenceindividualDropDownListcontrolsfromclient-sidescriptbyusingtheProductID.WhatshouldyousettheClientIDModepropertyoftheDropDownListto?()
A.AutoID B.Static C.Inherit D.Predictable
单项选择题YouaredevelopinganASP.NETWebpagethatwilldisplaythemedianvaluefromasequenceofintegervalues.Youneedtocreateanextensionmethodtocomputethemedianvalue.Whichinterfaceshouldyouaddtheextensionmethodto?()
A. IComparer<T> B. IEnumerable<T> C. IEnumerator<T> D. IEqualityComparer<T>