单项选择题你正在创建一个将包含几个子控件的自定义控件,你应该从下面那个类继承?()

A.DetailsView
B.ObjectDataSource
C.Content
D.CompositeControl


您可能感兴趣的试卷

你可能感兴趣的试题

1.多项选择题你正在为 Web 应用创建一个控件 ContosoUI。你需要增加这个控件到 Microsoft VisualStudio .NET 的工具栏。你应该通过下面那两个操作完成?()

A. 创建ContosoUI控件为Web控件库。
B. 创建ContosoUI控件为Web用户控件。
C. 在Visual Studio .NET 工具栏,浏览并选择ContosoUI.ascx。
D. 在Visual Studio .NET 工具栏,浏览并选择ContosoUI.dll.

2.单项选择题你正在创建一个 Web 应用。你在 Web.config 文件中增加了如下的配置: 请问,你在代码中如何引用连接字符串?()

A.ConfigurationManager.ConnectionStrings.MyDB
B.ConfigurationManager.ConnectionStrings.System.Data.SqlClient
C.ConfigurationManager.ConnectionStrings[";MyDB";]
D.ConfigurationManager.ConnectionStrings[";System.Data.SqlClient";]

4.单项选择题你在创建一个 Web 窗体。这个 Web 窗体允许用户计算值并在名为 lblResults 的 Label 控件中显示结果。你需要在 Web 窗体通过 Error 事件截获所有未处理的异常并显示异常在 Web 窗体上。你可以使用下面那个代码段实现?()

A. protected void Page_Error(object sender, EventArgs e) { lblResults.Text = e.ToString();e=null;}
B. protected void Page_Error(object sender, EventArgs e) { lblResults.Text =Server.GetLastError().ToStri();Server.ClearError();}
C. protected void Page_Error(object sender, EventArgs e) Response.Write(e.ToString());e=null;}
D. protected void Page_Error(object sender, EventArgs e) Response.Write(Server.GetLastError().ToString()); Server.ClearError();}

5.单项选择题你的 Web 站点使用自定义主题,并且要求站点必须支持额外的基于公司名称的主题。公司名称在用户登录到 Web 站点时进行设置。公司的主题名存储在变量 ThemeName 中。你需要使用这个变量动态的设置 Web 站点的主题,你应该如何做?()

A.在Web站点的每个页面的声明标记中增加<%@pagetheme=”themename”…%>
B.在Web站点的每个页面的Load事件中增加Page.Theme=ThemeName;
C.在Web站点的每个页面的PreInit事件中增加Page.Theme=ThemeName;
D.在Web站点的配置文件中增加

6.单项选择题你正在创建一个 Web 窗体。它包含一个让用户关闭页面的按钮 btnCancel。当用户单击这个按钮的时候需要跳过验证。在测试过程中,你发现单击 Cancel 按钮并不能关闭页面。你需要确保用户始终能够关闭页面,你应该如何做?()

A. 设置Web窗体上验证控件的Enabled 属性为False。
B. 设置btnCancel 按钮的CausesValidation 属性为False.
C. 设置btnCancel 按钮的CausesValidation 属性为True.
D. 设置Web窗体上验证控件的Visible 属性为False。

7.多项选择题你正在开发一个使用 SqlConnection 对象连接到 Microsoft SQL Server 数据库的应用。你的连接对象正在使用连接池。当连接池满的时候请求将被排队或者某些连接请求可能被拒绝。你需要确保应用能够尽早的释放连接给连接池。因此,为了减少连接被拒的可能性,你应该从下面那三个方法着手解决?()

A. 确保完成执行后调用每个连接对象的Close方法。
B. 确保完成执行后每个连接对象保持打开状态。
C. 在连接字符串内增加Max Pool Size的值。
D. 在连接字符串内增加Min Pool Size的值。
E. 在连接字符串内增加Connection Lifetime的值。
F. 增加SqlConnection对象的ConnectionTimeout属性的值。

9.单项选择题你有一个需要大约执行一分钟的 SQL 查询。为此,你使用如下的代码段异步执行这个查询:IAsyncResult ar = cmd.BeginExecuteReader()。当上面SQL查询在执行的过程中,你需要同时执行一个方法Do Work(),这个方法大约需要1秒钟的执行时间。而且在SQL 查询执行的过程中需要尽可能的多次执行Do Work()方法,你应该使用下面那个代码段?()

A. while (ar.AsyncWaitHandle == null) { DoWork();}dr = cmd.EndExecuteReader(ar);
B. while (!ar.IsCompleted) { DoWork();}dr = cmd.EndExecuteReader(ar);
C. while (Thread.CurrentThread.ThreadState == ThreadState.Running) { Do Work();}dr =cmd.EndExecuteReader(ar);
D. while (!ar.AsyncWaitHandle.WaitOne()) { DoWork();}dr = cmd.EndExecuteReader(ar);

10.单项选择题你正在创建一个应用。这个应用每分钟处理上百个 XML 文档。XML 文档使用在线的架构进行验证。你需要尽可能快的从文件系统装载并读取 XML 文档。要求,在读取 XML 文档的时候要忽略 XML 注释内容。你应该如何做?()

A. 通过使用带有XmlReaderSettings 参数的XmlReader 的Create方法创建一个XmlReader 实例。
B. 使用XmlTextReader 参数创建一个XmlReader 实例。
C. 创建一个XmlDocument 实例并且指定架构的位置。
D. 使用XmlNodeReader参数创建一个XmlReader 实例。

最新试题

You create a server control that inherits from WebControl. You need to enable the server control to emit markup for a new kind of mobile device. You must not alter the code in the server controls.Which two actions should you perform?()

题型:多项选择题

You need to turn on Tracing for a page that is not performing well. You must store the trace information in a database for reporting and trending.Which two actions should you perform?()

题型:多项选择题

You are developing a page named Products.aspx in a Web application that contains three DropDownList controls that are dynamically loaded from a SQL Server 2005 database file. The DropDownList controls represent a vendor list, a certification list, and an exam list. Certkiller .com customers use the Products.aspx page to select exams related to particular certifications on offer from a particular vendor. A Go button initiates the selection. Each DropDownList control has an associated RequiredFieldValidator control.Whenever the customer selects a vendor, and the vendor offers certifications, then the customer must also select a certification if the. If the vendor only offers exams and not certifications, the certification list should remain hidden. Whenever the customer selects a certification, the customer must also select an exam. Validation error messages should only be displayed when the Go button is clicked. You need to set properties on the vendor DropDownList control.What should you do?()

题型:单项选择题

Certkiller .com's e-Commerce Web application contains a page named Products.aspx that uses data source and data-bound server controls. Customers use the server controls to search for products. The Products.aspx page does not have an associated code-behind file. You need to convert the Products.aspx page to a user control so that its functionality can be reused on other pages.What should you do?()

题型:多项选择题

You are creating a composite control for capturing user address information in a Web application. You define a number of properties that the user can set at design time. You need to group these properties in the Properties dialog box. In addition, you need to ensure that when users click on a particular property, they receive a short explanation of that property. The properties are shown in the exhibit.Which two actions should you perform?()

题型:多项选择题

You create a Web site with membership and personalization enabled. You must use an existing CRM database for storing the membership information. You need to implement the Membership Provider.What should you do?()

题型:单项选择题

You create a Web site. You add an EditorZone control to the home page on the Web site. You need to enable users to customize the size and location of the Web Parts on their home pages.Which two controls should you add to the EditorZone control?()

题型:多项选择题

You have a Web application that is configured for personalization. You need to access personalization data from one of the pages of the Web application by using the minimum amount of administrative effort.What should you do? ()

题型:单项选择题

You are creating a Web application that will run on an intranet. The Web application reads comma-delimited text files. The text files reside in a subdirectory below the Web application's root directory. Users must not be able to navigate directly to these files in a Web browser unless they are members of the Accounting role. You need to write an ASP.NET HTTP handler that will use the FileAuthorizationModule class.Which form of authentication should you use?()

题型:单项选择题

You want to enable users of a Web application to modify the Web application's UI and behavior. These modifications must be maintained at the user level so that when users return to the Web application, the changes are still in effect. You need to achieve this goal by using the minimum amount of custom code.What should you do?()

题型:单项选择题