单项选择题

你正在创建一个 Web 窗体。这个 Web 窗体允许用户对列表中的产品进行改名或删除。你创建了一个绑定到 GridView 的 DataTable 对象 dtProducts。其中 DataTable 有如下 4 行数据:
用户使用Web窗体删除了第一个产品。你需要设置DataTable的DefaultView 的RowStateFilter属性,使GridView控件不显示被删除的产品。请问,你该如何设置RowStateFilter的值?()

A. Data ViewRowState.ModifiedOriginal;
B. Data ViewRowState.ModifiedCurrent;
C. Data ViewRowState.CurrentRows;
D. Data ViewRowState.Added;


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题

你正在使用如下的代码段去创建一个 DataTable:(行号只作为标识)
你需要确保当新的行被增加或修改时Total列的值为Price列乘以Quantity列的值。你该如何做?()

A. 在05行后增加dc.ExtendedProperties["Total"] = "Price *Quantity”;
B. 在05行后增加dc.Expression = “Prince * Quantity”;
C. 为DataTable的TableNewRow 写事件处理代码来更新Total 的值。
D. 为DataTable的ColumnChanged写事件处理代码来更新Total 的值。

2.单项选择题

你正在装载一个名为 doc 的 XML 文档。文档内容如下:你需要使用Xpath查询去选择book节点,你该如何做?()

A. XmlElement root = doc.DocumentElement;XmlNodeList nodes = root.SelectNodes(“.”);
B. XmlElement root = doc.DocumentElement;XmlNodeList nodes = root.SelectNodes(“book”);
C. XmlElement root = doc.DocumentElement; XmlNodeList nodes =root.SelectNodes(“bookstore//book”);
D. XmlElement root = doc.DocumentElement; XmlNodeList nodes =root.SelectNodes(“books/book”);

3.单项选择题下面那个代码段正确的增加了一个TextBox控件到一个名为form1的Web窗体上?()

A.TextBox c = new TextBox(); c.ID = "txtUserName"; c.Visible = true;
B.TextBox c = new TextBox(); c.ID = "txtUserName"; c.Visible = true; c.Controls.Add(form1);
C.TextBox c = new TextBox(); c.ID = "txtUserName"; c.Visible = true; c.Add(form1);
D.TextBox c = new TextBox(); c.ID = "txtUserName"; c.Visible = true; form1.Controls.Add(c);

4.单项选择题你正在创建一个名为PageBase.master 的母版页。这个母版页包含一个Label控件lblTitle。你创建了一个引用此母版页的内容页。你需要从内容页改变母版页 lblTitle 控件的 Text 属性值。你应该如何做()?

A. Label lblTitle = (Label)Master.FindControl(“lblTitle”);lblTitle.Text = “Articles”;
B. Label lblTitle = (Label)Parent.FindControl(“lblTitle”);lblTitle.Text = “Articles”;
C. Master.Page.Title = “Articles”;
D. ((Label)Page.FindControl(“lblTitle”)).Text = “Articles”;

6.多项选择题你创建了一个包含连接 Web 部件的 Web 窗体。你在 Web 窗体中写了如下的声明:你需要保证你的Web部件连接是有效的。你应该完成下面那两个操作?()

A. 在 Web 窗体上包括一个标识为 WebPartConnection1 的数据源。
B. 在 Web 窗体上包括一个标识为 customerPart 的 Web 部件。
C. 在 Web 窗体上包括一个标识为 ordersPart 的 Web 部件。
D. 确保你声明了一个接口 "IOrdersPart".
E. 确保你声明了一个接口 "ICustomerPart".
F. 确保每个Web部件声明了GetInterface或ProvideInterface方法。


7.单项选择题你创建了一个 Web 站点,此站点在用户 profile 对象中存储用户的所有可用主题。你需要在用户登录 Web 站点时,为站点应用用户预先选择好的主题。你应该如何做?()

A. 在InitComplete事件处理中,基于用户profile设置Page对象的Theme属性。
B. 在PreLoad事件处理中,基于用户profile设置Page对象的Theme属性。
C. 在OnLoad事件处理中,基于用户profile设置Page对象的Theme属性。
D. 在PreInit事件处理中,基于用户profile设置Page对象的Theme属性。

8.多项选择题你为你的公司创建了一个 Web 站点。你的站点中包含的页面和控件都使用你一贯的设计。现在,你需要改变服务器上所有 Web 站点的样式。你需要达到这个目的,但是又不需要编辑各个站点的页面,你应该通过下面那两个步骤完成?()

A. 在应用的根目录下的App_Themes 目录下放一个主题。
B. 在ASP.NET 安装目录下的ASP.NETClientFiles 目录下放一个主题文件。
C. 通过设置<%@ Page Theme="..." %> 标记指定一个主题。
D. 在Web.config 文件中配置<pages theme="..."/>节来指定一个主题。

9.多项选择题你创建了一个 Web 应用。你需要对一个运行不是很好的页面进行跟踪。而且你必须把跟踪信息存储在一个数据库中。为此,你应该通过下面那两个步骤完成?()

A.为Trace.Trace Finished事件增加跟踪内容事件处理程序,并且把跟踪信息记录到数据库中。
B.在Web.config文件中增加system.diagnostics配置节,然后在新的节增加一个listener。
C.使用System.Diagnostics.Trace对象连接到数据库,并且插入跟踪记录到数据库。
D.在Page_Load事件中,使用Trace.Write插入信息到数据库。


最新试题

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?()

题型:单项选择题

You are developing a Web application. Your code restricts access to some pages based on the users credentials. You need to configure IIS to supply the user's Windows credentials to your Web application. These credentials must be encrypted.What should you do? ()

题型:单项选择题

You create a Web Form. The Web Form uses the FormView control to enable a user to edit a record in the database. When the user clicks the Update button on the FormView control, the application must validate that the user has entered data in all of the fields. You need to ensure that the Web Form does not update if the user has not entered data in all of the fields.Which code segment should you use?()

题型:单项选择题

You are using the ASP.NET membership APIs to manage user accounts for a Web site. The Web.config file contains the definition for the membership provider. After modifying the Web.config file to enable password recovery, you create a PasswordReset.aspx file.? You need to enable users to reset their passwords online. The new passwords must be sent to them by e-mail after they have logged on through the Login.aspx page. In addition, users must be required to answer their secret questions before resetting their passwords.Which code logic should you use?()

题型:单项选择题

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 are developing a page named Process.aspx in a shopping cart Web application that will be integrated into Certkiller .com's existing e-Commerce Web site. The Process.aspx page allows customers to pay for purchases using their credit cards. The Process.aspx page contains a Button control that confirms the customer's payment and calls an external Web service that charges the customer's credit card. You must implement confirmation and prevent postback unless the customer confirms payment.What should you do?()

题型:单项选择题

You create a large, n-tier Web application that has a custom event tracking system. You need to create a custom event type that enables your event tracking system to record all relevant event details for all types of events. The events must be stored in Microsoft SQL Server.From which base type should your custom event type inherit? ()

题型:单项选择题

You create a Web Form. You need to add controls that use adaptive rendering to display content. The type of content rendered must depend on the device that is requesting the page.What are two possible ways to achieve this goal? ()

题型:多项选择题

You create a Web Form. The Web Form allows users to calculate values and display the results in a label named lblResults. You need to capture all unhandled exceptions on the Web Form through the Error event. The Error event must capture each unhandled exception and display it on the Web Form.Which code segment should you use?()

题型:单项选择题

You are developing a product search page named Search.aspx for Web application that will be integrated into Certkiller .com's existing e-Commerce Web site. The Search.aspx page allows customers search for products that match specific criteria. Once a product is located, you want an image of the product to be displayed. You want to use an Image control to display the image. You want to configure the Image control to display a description of the image if the image cannot be displayed in the customer's Web browser.What should you do?()

题型:单项选择题