单项选择题你正在新建一个创建用户帐号的Web页面。你通过代码在页面上增加了一个 CreateUserWizard 控件。你需要保证向导能够在用户完成创建账号后自动发送 e-mail 给用户。你已经在 web.config 文件增加了一个有效的元素。请问,你应该在 Page_Load 事件中增加下面那个代码段?()

A. Wizard1.RequireEmail = true;
B. Wizard1.Email = “user@address.com”;
C. Wizard1.MailDefinition.From = “registration@mysite.com”;
D. SmtpMail.SmtpServer = “mail.contoso.com”;


您可能感兴趣的试卷

你可能感兴趣的试题

1.单项选择题你创建了一个管理项目文档的 intranet Web 站点。你需要所有用户都可以浏览站点的文档,但是只有 administrators 组的成员可以上传文档。你应该使用下面那个代码段来配置Web.config 文件?()

A. <allow verbs="GET" users="*" /><deny verbs="POST" users="*" /><allow verbs="POST"roles="Administrators" />
B. <allow role s="Administrators" /><deny users="*" />
C. <allow users="Administrators" /><allow users="*" />
D. <allow verbs ="POST" roles="Administrators" /><deny verbs="POST" users="*" /><allow verbs="GET" users="*" />


2.单项选择题你正在创建一个生成 XML 文档的 ASP.NET Web 应用。你需要为文档增加一个 XML 声明。下面那个代码能够生成如下的 XML 声明?()

A.XmlDocument doc = new XmlDocument();doc.Load("subscribers.xml");XmlDeclaration xmldecl = doc.CreateXmlDeclaration("encoding", "Unicode");
B.XmlDocument doc = new XmlDocument();doc.Load("subscribers.xml"); XmlDeclaration xmldecl = doc.CreateXmlDeclaration("1.0", null, "yes");
C.XmlDocument doc = new XmlDocument(); doc.Load("subscribers.xml"); XmlDeclaration xmldecl = doc.CreateXmlDeclaration("1.0", "Unicode", "yes");
D.XmlDocument doc = new XmlDocument(); doc.Load("subscribers.xml"); XmlDeclaration xmldecl = doc.CreateXmlDeclaration("1.0", "Unicode");


3.单项选择题你创建了一个使用membership 和personalization的Web站点。你必须使用一个已有的CRM数据库来存储成员资格(membership)数据.为此你需要实现成员资格提供程序(Membership Provider)。请问,你应该如何做?()

A.修改Web.config中连接到CRM数据库的连接字符串。
B.在Web.config文件中增加一个新的SqlMembership Provider。
C.创建一个从Membership Provider继承的自定义Membership Provider。
D.创建一个从Membership User继承的自定义Membership Membership User。

4.多项选择题你创建了一个Web页面。这个Web页面允许用户找回他们的密码。你通过如下代码段为你的页面增加了PasswordRecovery控件:。你需要保证这个服务器控件能够产生一个新的密码并且发送到用户指定的邮箱。你应该通过下面哪两个步骤完成?()

A. 在Web.config文件创建一个有效的定义。
B. 设置成员提供程序的passwordFormat属性为 Encrypted 。
C. 确保已配置的成员提供程序的enablePasswordRetrieval 属性设置为False。
D. 确保已配置的成员提供程序的enablePasswordRetrieval 属性设置为True。

5.多项选择题你正在创建一个自定义用户控件。这个控件将被用在允许用户注册和个性化体验的 Web 站点中的 10 个 Web 窗体。自定义用户控件中包含两个 TextBox 控件和两个 Button 控件。你需要保证只有在用户没有登录到 Web 站点时控件是可见的,反之是不可见的。你也需要保证Web 站点的开发和维护的工作量最小。你应该通过下面那两个操作来达到此目的?()

A.在自定义控件代码中为Login按钮增加事件处理代码。
B.在自定义控件所在的Web窗体代码中为Login按钮增加事件处理代码。
C.在自定义控件所在的Web窗体的Page_Load方法中增加代码段去设置TextBox和Button控件的可见性。
D.在自定义控件的Page_Load方法中增加代码段去设置TextBox和Button控件的可见性。

6.多项选择题你正在开发一个显示产品信息的 Web 应用。你的 Web 应用的不同页面上都会显示产品信息。为此,你需要开发一个用于产品信息显示的用户控件,并且需要为控件实现一个默认的用户界面。另外,你的控件需要为开发者提供可自定义的界面布局的功能。为了达到这个目的,你应该通过下面哪三步操作完成?()

A. 为类型为Itemplate的属性声明一个属性TemplateContainerAttribute。并且传递模板的命名 容器类型作为参数。
B. 为用户控件的类定义声明属性TemplateContainerAttribute 。
C. 在用户控件的code-behind 类中实现一个类型为INamingContainer 的属性。
D. 在用户控件的code-behind 类中实现一个类型为ITemplate的属性。
E. 定义一个从ITemplate 继承的新类。实现ITemplate 接口的InstantiateIn 方法。

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

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

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

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

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

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

最新试题

You create an intranet Web site for management of project documents. You need to enable all users to browse documents on the site. Only members of the administrators group must be ble to upload files.Which code segment of the Web.config file should you use?()

题型:单项选择题

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 deploy your companys Internet Web site. You need to deny anonymous access to the Web site, allowing only authenticated users. Which code segment should you use?()

题型:单项选择题

You recently developed a Web application that accesses an external Web service to retrieve current exchange rates for Certkiller .com's e-Commerce Web site. The Web service converts USD prices to the customer's local currency. You have stored the URL to the external Web service's endpoint in the section of the Web.config file. The Web application has been successfully deployed to a Certkiller .com Web server named Certkiller -SR14. A few months later the vendor of the Web service changes the port that is used to access the Web service. You need to update the section of the Web application's Web.config file from Certkiller -WS528. You need to ensure that your solution has a minimal impact on customers that may be connected to the e-Commerce Web site.What should you do?()

题型:单项选择题

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 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 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 create a Web application for your company's intranet. You want to enable users to customize their versions of the intranet home page. You create sections of content as Web Parts. You need to ensure that users can customize content at any time.Which two code segments 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 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? ()

题型:单项选择题