object customerCount = cmd.ExecuteScalar();lblCompanyName.Text = customerCount.ToString();
int customerCount = cmd.ExecuteNonQuery();lblCompanyName.Text = customerCount.ToString();
SqlDataReader dr = cmd.ExecuteReader();dr.Read();lblCompanyName.Text = dr[0].ToString();
SqlDataReader dr = cmd.ExecuteReader();dr.Read();lblCompanyName.Text = dr.ToString();
第1题:
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()
第2题:
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?()
第3题:
You create a Web Form that allows users to create a new account. You add a CreateUserWizard control by using the following code segment. You need to ensure that the wizard automatically sends an e-mail message to users when they finish creating their accounts. You add a valid
第4题:
You are creating a DataTable. You use the following code segment to create the DataTable. (Line numbers are included for reference only.) 01 Dim dt As New DataTable("Products") 02 dt.Columns.Add(New DataColumn("Price", _ GetType(Decimal))) 03 dt.Columns.Add(New DataColumn("Quantity", _ GetType(Int32))) 04 Dim dc As DataColumn = New DataColumn("Total", _ GetType(Decimal)) 05 dt.Columns.Add(dc) You need to ensure that the Total column is set to the value of the Price column multiplied by the Quantity column when new rows are added or changed. What should you do? ()
第5题:
You create a Web Form. The Web Form allows users to recover their passwords. You add a PasswordRecovery server control by using the following code segment.You need to ensure that the server control generates a new password and sends it by e-mail to the users e?mail address. Which two actions should you perform?()
第6题:
You create a Web Form. The Web Form allows users to log on to a Web site. You implement the login logic using a Login control named Login1. The membership data for the application is stored in a SQL Express database in the App_Data directory. You need to configure your application so that the membership data is stored in a local Microsoft SQL Server database. You add the following code segment to the Web.config file.
第7题:
Add the following code segment to the Page_Load method of the page code-behind file. Dim custom As Custom = Me.Parent lblRegion.Text = custom.Region
Add the following code segment to the Page_Load method of the page code-behind file. Dim custom As Custom = Me.Master lblRegion.Text = custom.Region
Add the following code segment to the Page_Load method of the Custom.Master.vb code-behind file. Dim lblRegion As Label = Page.FindControl(lblRegion) lblRegion.Text = Me.Region
Add the following code segment to the Page_Load method of the Custom.Master.vb code-behind file. Dim lblRegion As Label = Master.FindControl(lblRegion) lblRegion.Text = Me.Region
第8题:
Include a data source identified as WebPartConnection1 on the Web Form.
Include a Web Part identified as customerPart on the Web Form.
Include a Web Part identified as ordersPart on the Web Form.
Ensure that you declare an interface named IOrdersPart.
Ensure that you declare an interface named ICustomerPart.
Ensure that each Web Part declares either a GetInterface or ProvideInterface method.
第9题:
Wizard1.RequireEmail = True
Wizard1.Email = user@address.com
Wizard1.MailDefinition.From = registration@mysite.com
SmtpMail.SmtpServer = mail.contoso.com
第10题:
public void DoWork();
public void DoWork(int nCounter);
public void DoWork(object oCounter);
public void DoWork(Delegate oCounter);
第11题:
A
B
C
D
第12题:
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create a page that contains the following code fragment:
第13题:
You work as a Web Developer at Certkiller.com. You are in the process of creating a Webapplication using Microsoft ASP.NET 3.5. The configuration below exists in the Web.config file:
第14题:
You create a Web Form that contains connected Web Parts. You write the following declaration in your Web Form. You need to ensure that your Web Part connection is valid. Which two actions should you perform? ()
第15题:
You are creating a Windows Forms application by using the .NET Framework 3.5.You plan to develop a new control for the application. You need to ensure that the control extends the DataGridView control by allowing the cells to contain multicolored text. What should you do?()
第16题:
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? ()
第17题:
You define the following regular expression of currency values: regex tx = new regex("^-?/d+(/./d{2})?$") You are required to write code that will be used to find whether a string in the variable named Bill matches the regular expression or not. You are also required to use this code as the expression in a conditional statement and need to know which code segment to use. What should you do?()
第18题:
Page.RegisterRequiresPostBack(this);
Page.RegisterRequiresControlState(this);
Page.UnregisterRequiresControlState(this);
Page.RegisterStartupScript(SharedControl,server);
第19题:
Page.RegisterRequiresPostBack(Me)
Page.RegisterRequiresControlState(Me)
Page.UnregisterRequiresControlState(Me)
Page.RegisterStartupScript(SharedControl, server)
第20题:
protected void Page_Error(object sender, EventArgs e) { lblResults.Text = e.ToString(); e=null;}
protected void Page_Error(object sender, EventArgs e) { lblResults.Text = Server.GetLastError().ToString(); Server.ClearError();}
protected void Page_Error(object sender, EventArgs e) Response.Write(e.ToString()); e=null;}
protected void Page_Error(object sender, EventArgs e) Response.Write(Server.GetLastError().ToString()); Server.ClearError();}
第21题:
Anonymous
Certificate
Forms
Microsoft Windows Integrated Security
第22题:
The output will be FormsUser.
The output will be Certkiller/RAllen.
The output will be Certkiller/Anonymous.
The output will be Certkiller/WebApp