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>
单项选择题YouaredevelopinganASP.NETMVC2application.Aviewcontainsaformthatallowsuserstosubmittheirfirstname.Youneedtodisplaythevaluethatissubmitted,andyoumustensurethatyourcodeavoidscross-sitescripting.Whichcodesegmentshouldyouuse?()
A.<%: Model.FirstName %> B.<%= Model.FirstName %> C.<% Response.Write(Model.FirstName) %> D.<% Response.Write(HttpUtility.HtmlDecode(Model.FirstName)) %>
单项选择题YouaredevelopinganASP.NETMVC2Webapplication.TheapplicationcontainsacontrollernamedHomeController,whichhasanactionnamedIndex.TheapplicationalsocontainsaseparateareanamedBlog.AviewwithintheBlogareamustcontainanActionLinkthatwilllinktotheIndexactionoftheHomeController.YouneedtoensurethattheActionLinkintheBlogarealinkstotheIndexactionoftheHomeController.WhichActionLinkshouldyouuse?()
A.Html.ActionLink("Home", "Index", "Home") B.Html.ActionLink("Home", "Index", "Home", new {area = ""}, null) C.Html.ActionLink("Home", "Index", "Home", new {area = "Blog"}, null) D.Html.ActionLink("Home", "Index", "Home", new {area = "Home"}, null)
多项选择题You are developing an ASP.NET Web page. You add the following markup to the page. You add the following code segment to the code-behind. You need to save the uploaded file and display a message to the user that indicates that the upload either succeeded or failed. Which two actions should you perform?()
A.Replace line 3 with the following code segment. if (FileUpload1.HasFile) B.Replace line 3 with the following code segment. if (FileUpload1.FileContent.Length > 0) C.Insert the following code segment at line 6. FileUpload1.SaveAs(saveName); D.Insert the following code segment at line 6. FileUpload1.FileContent.CopyTo(new FileStream(saveName, FileMode.Open);