题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-12-15 03:20:38

[多项选择]You are creating a Web Form. You write the following code segment to create a SqlCommand object. SqlConnection conn = new.SqlConnection(connString); conn.Open( ); SqlCommand cmd = conn.CreateCommand( ); cmd.CommandText = “select cont(*) from Customers”; You need to display the number of customers in the Customers table. Which two code segments can you use to achieve this goal? ()
A. object customerCount = cmd.ExecuteScalar();lblCompanyName.Text = customerCount.ToString();
B. int customerCount = cmd.ExecuteNonQuery();lblCompanyName.Text = customerCount.ToString();
C. SqlDataReader dr = cmd.ExecuteReader();dr.Read();lblCompanyName.Text = dr[0].ToString();
D. SqlDataReader dr = cmd.ExecuteReader();dr.Read();lblCompanyName.Text = dr.ToString();

更多"You are creating a Web Form. You wr"的相关试题:

[多项选择]You are creating a Web Form. You write the following code segment to create a SqlCommand object.Dim conn As SqlConnection = New SqlConnection(connString)conn.Open( )Dim cmd As SqlCommand = conn.CreateCommand( )cmd.CommandText = "select count(*) from Customers"You need to display the number of customers in the Customers table. Which two code segments can you use to achieve this goal?()
A. Dim customerCount As Object = cmd.ExecuteScalar()lblCompanyName.Text = customerCount.ToString()
B. Dim customerCount As Integer = cmd.ExecuteNonQuery()lblCompanyName.Text = customerCount.ToString()
C. Dim dr As SqlDataReader = cmd.ExecuteReader()dr.Read()lblCompanyName.Text = dr(0).ToString()
D. Dim dr As SqlDataReader = cmd.ExecuteReader()dr.Read()lblCompanyName.Text = dr.ToString()
[单项选择]You write a Web application. This application must support multiple languages. You store the localized strings in the application as resources. You want these resources to be accessed according to a users language preference. You create the following resource files in the App_GlobalResources folder of your application.myStrings.resxmyStrings.enCA.resxmyString.en-US.resxmyStrings.fr-CA.resxmyStrings.es-MX.resx resource file stores a localized version of the following strings: Name, E-mail, Address, and Phone. You create a Web Form that contains one label for each of these strings. You need to ensure that the correct localized version of each string is displayed in each label, according to a users language preference. What should you do? ()
A. Add the following configuration section to the Web.config file.
B. Set the directive for each page in your site as follows: <%@ Page UICulture="Auto" %>
C. Add the following code segment to the pages load event. lblName.Text = "{myStrings}Name" lblAddress.Text = "{myStrings}Address" lblEmail.Text = "{myStrings}Email" lblPhone.Text = "{myStrings}Phone"
D. Add the following code segment to the pages load event. lblName.Text = Resources.myStrings.Name lblAddress.Text = Resources.myStrings.Address lblEmail.Text = Resources.myStrings.Email lblPhone.Text = Resources.myStrings.Phone
[单项选择] You are creating a Web Form. The Web Form allows users to rename or delete products in a list. You create a DataTable named dtProducts that is bound to a GridView. DataTable has the following four rows. dtProducts. Rows(0)("ProductName") = "Soap"dtProducts. Rows(1)("ProductName") = "Book"dtProducts. Rows(2)("ProductName") = "Computer"dtProducts. Rows(3)("ProductName") = "Spoon"dtProducts. AcceptChanges( ) The user utilizes a Web Form to delete the first product. You need to set the RowStateFilter property of the DataTables DefaultView so that only products that have not been deleted are shown. To which value should you set the DataTabless DefaultView.RowStateFilter?()
A. Data View Row State.Modified Original
B. Data View Row State.Modified Current
C. Data View Row State.Current Rows
D. Data View Row State.Added
[单项选择]You are creating a mobile Web Form that dynamically displays news items. You want to display news items by using an instance of a mobile TextView control named TextViewNews. You need to configure the Web Form that contains TextViewNews. The Web Form must enable pagination in case a users device does not display the full text of a news item. Which code segment should you use? ()
A. Dim ps As PagerStyle = New PagerStyle()ps.NextPageText = "more >"ps.PreviousPageText = "< back"FormNews.Paginate = True
B. FormNews.PagerStyle.NextPageText = "more >"FormNews.PagerStyle.PreviousPageText = "< back"TextViewNews.PaginateRecursive(New ControlPager(FormNews, 1000))
C. FormNews.PagerStyle.NextPageText = "more >"FormNews.PagerStyle.PreviousPageText = "< back"FormNews.PaginateRecursive(New ControlPager(FormNews, 1000))
D. FormNews.PagerStyle.NextPageText = "more >"FormNews.PagerStyle.PreviousPageText = "< back"FormNews.Paginate = True
[单项选择] You are creating a templated Web control for use in your Web application.You need to add the Web control to your Web application pages without compiling your control into a .dll file. What should you do?()
A. Ensure that the Web control inherits from the WebControl class.
B. Ensure that the Web control inherits from the Control class.
C. Ensure that the Web control inherits from the CompositeControl class.
D. Ensure that the Web control inherits from the UserControl class.
[多项选择] You are creating an ASP.NET web application that hosts several Windows Communication Foundation (WCF) services. The services have ASP.NET Compatibility Mode enabled. Users authenticate with the Web application by using a cookie-based ASP.NET Forms Authentication model. You add a service file named Authentication.svc that contains the following code segment: <%@ ServiceHost Service="System.Web.ApplicationServices.AuthenticationService" Factory="System.Web.ApplicationServices.ApplicationServicesHostFactory" %> You need to ensure that users can access the WCF services without having to re-authenticate. Which two configuration settings should you add? (Each is part of a complete solution. Choose two.)()
A. In the system web. Extensions scripting/webServices/authenticationService element, set the enabled attribute to true.
B. In the system web. Extensions scripting/webServices/profileService element, set the enabled attribute to true.
C. Add a service endpoint with basicHttpBinding for the contract System.Web.ApplicationServices.AuthenticationService.
D. Add a custom service behavior named AuthenticationService Type Behaviors with a service AuthenticationManager element that has service AuthenticationManagerType set to System.Web.Security.SQL Membership Provider
[单项选择] 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?()
A. Anonymous
B. Certificate
C. Forms
D. Microsoft Windows Integrated Security
[多项选择]You write a logging function for a Web Form. You call the logging function from the Page_Unload event handler. You test the Web Form and notice that the Page_Unload event handler does not call the logging function. You need to ensure that the logging function is called. What are two possible ways to achieve this goal? ()
A. Set the Page attribute to AutoEventWireup="False". Remove the attribute onunload="Page_Unload" from the Web Form element.
B. Set the Page attribute to AutoEventWireup="False". Add the attribute OnUnload="Page_Unload" to the Web Form element.
C. Set the Page attribute to AutoEventWireup="False". Add the Web Form attribute autocomplete=on.
D. Set the Page attribute to AutoEventWireup="True".
[多项选择] You enabled an audit policy by issuing the following statements: SQL> AUDIT POLICY ORA_DATABASE_PARAMETER BY SCOTT; SQL> AUDIT POLICY ORA_DATABASE_PARAMETER BY SYS, SYSTEM; For which database users and for which executions is the audit policy now active? ()
A. SYS, SYSTEM
B. SCOTT
C. Only for successful executions
D. Only for failed executions
E. Both successful and failed executions

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码