在编写ASP.NET页面时,若希望在每次页面载入时执行某个操作,则应将相应代码写入()事件处理程序中。 A: 页面的Load B: 页面的init C: 页面的PreRender D: 页面的Disposed消息
在编写ASP.NET页面时,若希望在每次页面载入时执行某个操作,则应将相应代码写入()事件处理程序中。 A: 页面的Load B: 页面的init C: 页面的PreRender D: 页面的Disposed消息
You are the newly appointed Web Application Developer at Certkiller.com. You make use ofMicrosoft .NET Framework v3.5 to create a Microsoft ASP.NET application. You create a page on the application that contains the code segment below:<asp:ListBox ID="lstBox1"AutoPostBack="true" runat="server" /> The page contains a code-behind file. The code below is written in the file:Private Sub BindData(ByVal sender As Object, ByVal e As EventArgs) lstLanguages.DataSource = CultureInfo.GetCultures(CultureTypes.AllCultures)lstLanguages.DataTextField = "EnglishName"lstLanguages.DataBind()End Sub You receive an instruction from management to make sure that lstBox1 ListBox control retains theselection of the Certkiller client during postback. You thus need to determine the appropriate codethat should be added in the constructor of the page. What should you do?() A: You should consider adding AddHandler lstLanguages.SelectedIndexChanged, AddressOfBindData to the constructor of the page. B: You should consider adding AddHandler Me.Init, AddressOf BindData to the constructor of thepage. C: You should consider adding AddHandler Me.PreRender, AddressOf BindData to theconstructor of the page. D: You should consider adding AddHandler lstLanguages.PreRender, AddressOf BindData to theconstructor of the page.
You are the newly appointed Web Application Developer at Certkiller.com. You make use ofMicrosoft .NET Framework v3.5 to create a Microsoft ASP.NET application. You create a page on the application that contains the code segment below:<asp:ListBox ID="lstBox1"AutoPostBack="true" runat="server" /> The page contains a code-behind file. The code below is written in the file:Private Sub BindData(ByVal sender As Object, ByVal e As EventArgs) lstLanguages.DataSource = CultureInfo.GetCultures(CultureTypes.AllCultures)lstLanguages.DataTextField = "EnglishName"lstLanguages.DataBind()End Sub You receive an instruction from management to make sure that lstBox1 ListBox control retains theselection of the Certkiller client during postback. You thus need to determine the appropriate codethat should be added in the constructor of the page. What should you do?() A: You should consider adding AddHandler lstLanguages.SelectedIndexChanged, AddressOfBindData to the constructor of the page. B: You should consider adding AddHandler Me.Init, AddressOf BindData to the constructor of thepage. C: You should consider adding AddHandler Me.PreRender, AddressOf BindData to theconstructor of the page. D: You should consider adding AddHandler lstLanguages.PreRender, AddressOf BindData to theconstructor of the page.