T TestsWorld

Free practice test · Microsoft

Exam 70-315

14 questions with a timer and instant results. Practise in short drills or take the full test, then see exactly which topics need work.

📝 14 questions ⏱ 17 min for all 🎯 Pass mark 65% 💸 Free, unlimited attempts
⚡
Short drills

Pick 10, 25 or 50 questions for a quick round, or take all of them.

💡
Learn as you go

Practice mode shows the right answer and an explanation for every question.

📊
See your weak spots

Your result shows strong and weak topics and what to read next.

What's in the test

Easy 21% Medium 43% Hard 36%
CheckBoxList Layout 1Image ToolTip 1SQL Connection Strings 1DataView Sorting 1User Control Properties 1Validation Controls 1DataGrid Footer 2Output Caching 1Page Directive 1User Controls 1Client-Side Validation 1Custom Errors 1

Sample questions with answers

4 of the 14 questions in Exam 70-315. Try each one, then open the answer.

  1. Question 1
    You are creating an ASP.NET page for a travel service. The page contains a CheckBoxList control that contains travel destinations. Customer can select favorite destinations to receive weekly e-mail updates of travel packages. The CheckBoxList control is bound to a database table of possible destinations. Each destination is ranked according to its popularity. You modify the page to sort the destination list by rank, from the most popular to the least popular. The list has three columns. You want the most popular destination to be on the top row of the check box list at run time. Which property setting should you use for the CheckBoxList control?
    • A. Set the RepeatDirection property to Vertical.
    • B. Set the RepeatDirection property to Horizontal.
    • C. Set the RepeatLayout property to Flow.
    • D. Set the RepeatLayout property to Table.
    Show answer
    Answer: B. Set the RepeatDirection property to Horizontal.
    Set the RepeatDirection property to Horizontal. Is the correct answer
  2. Question 2
    You create an ASP.NET page that uses images to identify areas where a user can click to initiate actions. The users of the application use Internet Explorer. You want to provide a pop-up window when the user moves the mouse pointer over an image. You want the pop-up window to display text that identifies the action that will be taken if the user clicks the image. What should you do?
    • A. For each image, set the AlternateText property to specify the text you want to display, and set the ToolTip property to True.
    • B. For each image, set the ToolTip property to specify the text you want to display.
    • C. In the onmouseover event handler for each image, add code that calls the RaiseBubbleEvent() method of the System.Web.UI.WebControls.Image class.
    • D. In the onmouseover event handler for each image, add code that calls the ToString() method of the System.Web.UI.WebControls.Image class.
    Show answer
    Answer: B. For each image, set the ToolTip property to specify the text you want to display.
    WebControl.ToolTip property gets or sets the text displayed when the mouse pointer hovers over the Web server control. The use of the ToolTip property meets the requirement of this scenario. Reference: .NET Framework Class Library, WebControl.ToolTip Property [C#] Incorrect Answers A: The AlternateText property is used to specify the text to display if the image is not available. C: The RaiseBubbleEvent is not useful here. Note: ASP.NET server controls such as the Repeater, DataList and DataGrid Web controls can contain child controls that raise events. Rather than each button raising an event individually, events from the nested controls are "bubbled"-that is, they are sent to the control's parent. D: The ToStringMethod() would not by itself provide the functionality required.
  3. Question 3
    You are a Web developer for CertKing . You create an ASP.NET application that accesses sales and marketing data. The data is stored in a Microsoft SQL Server 2000 database on a server named CertK 01. The company purchases a factory automation software application. The application is installed on CertK 01, where it creates a second instance of SQL Server 2000 named Factory and a database named FactoryDB. You connect to FactoryDB by using Windows Integrated authentication. You want to add a page to your ASP.NET application to display inventory data from FactoryDB. You use a SqlConnection object to connect to the database. You need to create a connection string to FactoryDB in the instance of SQL Server named Factory on CertK 01. Which string should you use?
    • A. "Server= CertK 01;Data Source=Factory; Initial Catalog=FactoryDB;Integrated Security=SSPI"
    • B. "Server= CertK 01;Data Source=Factory; Database=FactoryDB;Integrated Security=SSP1"
    • C. "Data Source= CertK 01\Factory;Initial Category=Factory; Integrated Security=SSP1"
    • D. "Data Source= CertK 01\Factory;Database=FactoryDB; Integrated Security=SSP1"
    Show answer
    Answer: D. "Data Source= CertK 01\Factory;Database=FactoryDB; Integrated Security=SSP1"
    The Data Source attribute of the connection string contains the name, instance or network address of the instance of SQL Server to which to connect. In this scenario we are to connect to the Factory Instance on CertK 01 so we use CertK 01\Factory as data source. To specify the database we should either use the Database or the Initial Catalog attribute. Here we use Database=FactoryDB. Note: The SQL Server .NET Data Provider provides connectivity to Microsoft SQL Server version 7.0 or later using the SqlConnection object. The connection string includes the source database name, and other parameters needed to establish the initial connection. Reference: .NET Framework Class Library, SqlConnection.ConnectionString Property [C#] Incorrect Answers A, B: There is no Server attribute in the connection string. Instead we should use the Data Source attribute to specify the server and the instance. C: There is no Initial Category attribute in the connection string. We can use Database or the Initial Catalog attribute to specify the database.
  4. Question 4
    You create an ASP.NET application to display a sorted list of products in a DataGrid control. The product data is stored in a Microsoft SQL Server database named CertKing DB. Each product is identified by a numerical value named ProductID, and each product has an alphabetic description named ProductName. You write ADO.NET code that uses a SqlDataAdapter object and a SqlCommand object to retrieve the product data from the database by calling a stored procedure. You set the CommandType property of the SqlCommand object to CommandType.StoredProcedure. You set the CommandText property of the object to procProductList. Your code successfully files a DataTable object with a list of products that is sorted by ProductID in descending order. You want to data to be displayed in reverse alphabetic order by ProductName. What should you do?
    • A. Change the CommandType property setting of the SqlCommand object to CommandType.Text.Change the CommandText property setting of the SqlCommand object to the following: SELECT * FROM procProductList ORDER BY ProductName DESC; Bind the DataGrid control to the DataTable object.
    • B. Create a new DataView object based on the DataTable object. Set the Sort Property of the DataView object to "ProductName DESC". Bind the DataGrid control to the DataView object.
    • C. Set the AllowSorting property of the DataGrid control to True. Set the SortExpression property of the DataGridColumn that displays ProductName to "ProductName DESC". Bind the DataGrid control to the DataTable object.
    • D. Set the DisplayExpression property of the DataTable object to "ORDER BY ProductName DESC". Bind the DataGrid control to the DataTable object.
    Show answer
    Answer: B. Create a new DataView object based on the DataTable object. Set the Sort Property of the DataView object to "ProductName DESC". Bind the DataGrid control to the DataView object.
    We can create a DataView object, set the appropriate Sort Property and bind the DataGrid control to the DataView, and not the DataTable object. Reference: .NET Framework Developer's Guide, Sorting and Filtering Data Using a DataView [C#] Incorrect Answers A: procProductList is a stored procedure. It cannot be used in the FROM clause of a SELECT statement. C: The DataGrid.AllowSorting property gets or sets a value that indicates whether sorting is enabled. The DataGridColumn.SortExpression property gets or sets the name of the field or expression to pass to the OnSortCommand method when a column is selected for sorting. However, the sorting only occurs when a user clicks the column header. D: The DataTable.DisplayExpression gets or sets the expression that will return a value used to represent this table in the user interface. This is only a display string. We cannot use it to sort the DataTable.

Want all 14 with a timer and a topic-wise result? Start the free test at the top of this page.

About this practice test

This course will give you the ability to develop and implement middle-tier components, server components, and XML Web services by using Visual Studio .NET and the Microsoft .NET Framework. When you pass the Developing XML Web Services and Server Components with Microsoft Visual Basic® .NET, Microsoft Visual C#™ and the Microsoft .NET Framework exam, you achieve Microsoft Certified Professional status.

This practice test belongs to TestsWorld's Microsoft certification track. The bank covers the long history of Microsoft technical exams — from the classic 70-xxx Windows Server, SQL Server, Exchange and SharePoint papers, through to MCITP / MCSE designations. Many of these exams are now retired but the underlying concepts remain useful for legacy environment support, brown-field migrations, and historical reference.

What this practice test gives you

19 multiple-choice questions covering the subject area, served from a randomised order so each attempt feels fresh. Take the test at your own pace. Allowed time per attempt: 17 min. Pass mark: 65%.

Study tips. Many Microsoft exams in this bank are legacy 70-xxx era; review the explanations carefully and cross-check terminology against the modern Microsoft Learn documentation where the concept still applies. For currently-live exams, Microsoft Learn's role-based learning paths remain the canonical free study material.

Before you start: device, fullscreen and proctoring