单项选择题
You work as a Web Developer at Certkiller.com. You are in the process of creating a Webapplication.
You decide to make use of Microsoft ASP.NET 3.5 in order to create the application. The followingmarkup is present on the page:
<asp:TextBox ID="_statusTextBox" runat="server"/>
<asp:Button ID="_button" runat="server" Text="Filter"/>
<asp:SqlDataSource ID="_sqlDataSource" runat="server"
ConnectionString="<%$ ConnectionStrings:Certkiller %>"
SelectCommand="GetUsers" SelectCommandType="StoredProcedure"
FilterExpression="Active=1 AND Name LIKE ’{0}%’">
<FilterParameters>
<asp:ControlParameter ControlID="_statusTextBox"/>
</FilterParameters>
</asp:SqlDataSource>
<asp:GridView ID="_CKGridView" runat="server" DataSourceID="_sqlDataSource"/>
The page is used to retrieve the Users from a company database. However, only the active usersare displayed. The TextBox control allows you to also filter users by status. You do not specify astatus when you click the Filter button. You notice that the page does not filter by active users andshows all the users that are retrieved from the database. You need to make the necessary settingsto ensure that only the active users are being displayed on the page when a status is notspecified.
What should you do?()
A.You should ensure that a default value for the Status property of the ControlParameter controlis set.
B.You should ensure that the PropertyName property of the ControlParameter control is set toText.
C.You should ensure that the ControlParameter control’s ConvertEmptyStringToNull property isset to false.
D.You should ensure that the {0} placeholder in the FilterExpression property is replaced with the(?) symbol.
相关考题
-
单项选择题
You work as a Web Developer at Certkiller.com. You are in the process of creating a Webapplication using Microsoft ASP.NET 3.5. This application will be part of a solution that contains a Windows Communication Foundation (WCF) service project. The Web application will be used to make calls to a service identified in theWCF service project. Management is planning to host the Web application on a separate serverfrom the WCF service. They want the WCF service to perform remotely. You need to add areference to the WCF service. What should you do?()
A.You should add an assembly reference to the project.
B.You should add a project reference to the project.
C.You should add a Web reference to the project.
D.You should add a service reference to the project. -
单项选择题
You work as a Web Developer at Certkiller.com. You are in the process of creating a Webapplication using Microsoft ASP.NET 3.5. You need to ensure that the application is able to load staff information from an XML file into aDataSet instance. The XML file contains an inline schema. You have to call a method of theDataSet class in order to load the information. Identify how you can accomplish this?()
A.You should call the ReadXml method with the ReadSchema XML read mode.
B.You should call the ReadXml method with the InferTypedSchema XML read mode.
C.You should call the ReadXmlSchema method.
D.You should call the ReadXml method with the InferSchema XML read mode. -
单项选择题
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 Web application will be used to displays sales data from an XML file. The XML file does notcontain an inline schema. You notice that a DataSet-compatible schema is stored in an XSD file.The schema identifies a subset of the nodes that exist in the XML file. You should not make anymodifications to this schema. You decide to load the XML information in order for it to be navigated relationally and with the XMLDocument Object Model (DOM). What should you do?()
A.A
B.B
C.C
D.D
