MCQs > IT & Programming > ASP.NET With SQL Server MCQs > Basic ASP.NET with SQL Server MCQs

Basic ASP.NET with SQL Server MCQ

1.

You create an ASP.NET page that allows a user to enter a requested delivery date in a TextBox control named txtDelDate. The date must be no earlier than two business days after the order date, and no later that 60 business days after the order date. You add a CustomValidator control to your page. In the Properties window, you set the ControlToValidate property to txtDelDate. You need to ensure that the date entered in the txtDelDate TextBox control falls within the acceptable range of values. In addition, you need to minimize the number of round trips to the server. What should you do?

Answer

Correct Answer: Set the AutoPostBack property of txtDelDate to False. Set the ClientValidationFunction property to the name of a script function contained in the HTML page that is sent to the browser.

Note: This Question is unanswered, help us to find answer for this one

2.

Study the situation described below and identify the nature of relationship? Each student can enroll into more than one class. Each class can accommodate more than one student.

Answer

Correct Answer: M to N

Note: This Question is unanswered, help us to find answer for this one

3.

John is maintaining an ASP.NET application named HigherProfits. The application is written in Visual Basic .NET. The application includes a page named YearlySale.aspx that resides within the Sales namespace. The page class is named YearlySale. You discover that another developer accidentally deleted the Page directive for YearlySale.aspx. You want to create a new Page directive to allow YearlySale.aspx to work properly. Which directive should you use?

 

Answer

Correct Answer: <%@ Page Language=''vb'' CodeBehind=''YearlySale.aspx.vb'' ClassName=''Sales.YearlySale'' Inherits=''YearlySale''%>

Note: This Question is unanswered, help us to find answer for this one

4.

You have developed a custom server control and have compiled it into a file named FirstReport .dll

The code is displayed below: <%@ Register TagPrefix=" CertKing Tag" Namespace="ReportNS" Assembly=" CertKing Report" %> You want to set the PageNumber property of the control to 77. Which of the following lines of code should you include in your Web Form?

 

Answer

Correct Answer: <CertKing Tag:ReportNS PageNumber="77" runat="server" />

Note: This Question is unanswered, help us to find answer for this one

5.

Which of the following items are recommended when using XML comments to generate documentation?

Answer

Correct Answer: <exception>

Note: This Question is unanswered, help us to find answer for this one

6.

Which of the following is not a valid ASP.NET Web form control?

Answer

Correct Answer: <ASP:Div>

Note: This Question is unanswered, help us to find answer for this one

7.

Check the following code:

Public Shared Sub UpdateData(ByVal sql As String,ByVal connectionString As String, ByVal dataTable As DataTable)

Dim da As New OleDb.OleDbDataAdapter()
Dim cnn As New OleDb.OleDbConnection(connectionString)
dataTable.AcceptChanges()
da.UpdateCommand.CommandText = sql
da.UpdateCommand.Connection = cnn
da.Update(dataTable)
da.Dispose()
End Sub

You are creating an ASP.NET application that will be used by companies to quickly create information portals customized to their business. Your application stored commonly used text strings in application variables for use by the page in your application. You need your application to initialize these text strings only when the first user accesses the application. What should you do?

Answer

Correct Answer: Add code to the Application_OnStart event handler in the Global.asax file to set the values of the text strings.

Note: This Question is unanswered, help us to find answer for this one

8.

You are the software engineer for Premium Corp.. One of the pages in an ASP.NET application contains the following declaration:

<%@ Register Tagprefix="WoodySideBankControls" Namespace="WoodySideBankNameSpace" Assembly="MyAssembly" %>

The assembly named MyAssembly contains a custom server control named CSC1. Which of the following code samples will properly render CSC1 on the Web page?

Answer

Correct Answer:

<WoodySideBankControls:CSC1 id="Control1" runat="server"/>


Note: This Question is unanswered, help us to find answer for this one

9.

LAST_NAME  DEPARTMENT_ID     SALARY
ALLEN                10                      3000
MILLER              20                     1500
King                   20                      2200
Davis                 30                      5000

Which of the following Subqueries will execute without any error?

Answer

Correct Answer: SELECT distinct department_id FROM employees Where salary > ANY (SELECT AVG(salary) FROM employees GROUP BY department_id);

Note: This Question is unanswered, help us to find answer for this one

10.

View the following Create statement:

1 Create table Pers
2 (EmpNo Int not null,
3 EName Char not null,
4 Join_dt Datetime not null,
5 Pay Int)

Which line contains an error?

Answer

Correct Answer: None

Note: This Question is unanswered, help us to find answer for this one

11.

You are a web developer for an international literary website. Your application has a lot of text content that requires translation and few executable components. Which approach would you use?

Answer

Correct Answer: Detect and redirect

Note: This Question is unanswered, help us to find answer for this one

12.

Evaluate the following SQL statement:

SELECT e.employee_id,( (.15* e.salary) + (.5 * e.commission_pct) + (s.sales_amount * (.35 * e.bonus))) AS CALC_VALUE FROM employees e, sales s WHERE e.employee_id = s.emp_id; 

What will happen if all the parentheses are removed from the calculation?

Answer

Correct Answer: An error will be reported

Note: This Question is unanswered, help us to find answer for this one

13.

You are creating an ASP.NET page for your company's Web site. Customers will use the ASP.NET page to enter payment information. You add a DropDownList control named oPaymentTypeList that enables customers to select a type of credit card and bank accounts. You need to ensure that customers select a credit card type. You want a default value of Select to be displayed in the oPaymentTypeList control. You want the page validation to fail if a customer does not select a payment type from the list. What should you do?

Answer

Correct Answer: Add a RequiredFieldValidator control and set its ControlToValidate property to oPaymentTypeList. Set the InitialValue property of the RequiredFieldValidator control to Select.

Note: This Question is unanswered, help us to find answer for this one

14.

Sam is developing an application that enables the users to perform read and write operations on text files. He uses structured exception handling to handle the errors. He writes the code for closing all the files that were opened in the Finally block. Which of the following is true regarding the Finally block?

Answer

Correct Answer: Finally block is executed after Try block regardless of whether an error occurs

Note: This Question is unanswered, help us to find answer for this one

15.

Which of the two statements is true?

(a)MSIL code is platform independent

(b)CLR is platform dependent

 

Answer

Correct Answer: Both (a) and (b) are true

Note: This Question is unanswered, help us to find answer for this one

16.

You are maintaining data for its products in the Products table, and you want to see those products, which are 50 items that is currentStock or more than 50 but less than the minimum stock limit of items. The structure of the Products table is:

ProductID

ProductName

CurrentStock

MinimumStock

Two possible queries are:

(a)select * from products where currentStock > MinimumStock + 50

(b)select * from products where currentStock - 50 > MinimumStock

Choose the appropriate option with regard to the above queries.

Answer

Correct Answer: (a) and (b) both are correct

Note: This Question is unanswered, help us to find answer for this one

17.

Which of the following is the default configuration file for each application in ASP.NET?

Answer

Correct Answer: web.config

Note: This Question is unanswered, help us to find answer for this one

18.

You are creating an ASP.NET Web site for your company. The Web site will use both Microsoft(R) .NET Framework server controls and ActiveX controls. You want to use Microsoft Visual Studio(R) .NET to create a Setup and Deployment project to package the ActiveX controls. Which project type should you create?

Answer

Correct Answer: Merge Module

Note: This Question is unanswered, help us to find answer for this one

19.

You are creating an ASP.NET application that is hosted on your company's Web server. You want to access a database with minimal effort. What you will not do?

Answer

Correct Answer: Create a connection to the database

Note: This Question is unanswered, help us to find answer for this one

20.

You are debugging an ASP.NET application for Premium Corp.. Users will use the application to produce reports. Your application contains several Debug.WriteLine statements. Which window in Visual Studio .NET should you use to inspect output from the Debug.WriteLine statements?

Answer

Correct Answer: Output

Note: This Question is unanswered, help us to find answer for this one

21.

In Windows built-in authentication, what will happen with the following set of statements?

<system.web>   

<authorization>     

<deny users="RIL"/>     

<allow users="RIL"/>   

</authorization> </system.web>

Answer

Correct Answer: The user RIL is denied access because the <deny> element takes precedence over the <allow> element

Note: This Question is unanswered, help us to find answer for this one

22.

XYZ is creating an e-commerce site for PremiumBoutique. The site is distributed across multiple servers in a Web farm. Users will be able to navigate through the pages of the site and select products for purchase. XYZ wants to use a DataSet object to save their selections. Users will be able to view their selections at any time by clicking a Shopping Cart link. XYZ wants to ensure that each user's shopping cart DataSet object is saved between requests when the user is making purchases on the site. How can this requirement be implement?

Answer

Correct Answer: Use the HttpSessionState object returned by the Session property of the page to store the DataSet object. Use the Web.config file to configure an out-of-process session route

Note: This Question is unanswered, help us to find answer for this one

23.

Your company, StoreIt Inc has stored the text of several journals in a Microsoft SQL Server 7.0 database. Each sentence is stored in a separate record so that  the text can be retrieved with the finest granularity. Several of these works are many thousands of printed pages in length. You are building a Web application that will allow registered users to retrieve data from these volumes. When a user of your Web application requests large amounts of text, your application must return it in the most efficient manner possible. How should you build the large String object that is required to provide the most efficient response to the user?

Answer

Correct Answer: Use the StringBuilder class.

Note: This Question is unanswered, help us to find answer for this one

24.

What is the correct order of clauses in the select statement?

1        select
2        order by
3        where
4        having
5        group by

Answer

Correct Answer: 1,3,5,4,2

Note: This Question is unanswered, help us to find answer for this one

25.

You are creating an ASP.NET application. The application will be deployed on intranet. Application uses Microsoft Windows authentication. More than 100 users will use the ASP.NET application simultaneously. What setting should be done by the project manager regarding user authentication?

Answer

Correct Answer: Add the following element to the authentication section of the Web.config file: <allow users="?"/>

Note: This Question is unanswered, help us to find answer for this one

26.

You create an ASP.NET page named Customer.aspx. Customer.aspx contains a Web user control that displays a drop-down list box of Cities. The Web user control is named CityList, and it is defined in a file named CityList.ascx. The name of the DropDownList control in City.ascx is CuCity. You try to add code to the Page.Load event handler for Customer.aspx, but you discover that you cannot access CuCity from code in Customer.aspx. You want to ensure that code within Customer.aspx can access properties of CuCity. What should you do?

Answer

Correct Answer: In the code-behind file for CityList.ascx, add the following line of code: Public CuCity As DropDownList

Note: This Question is unanswered, help us to find answer for this one

27.

Consider the following ASP.NET events:

1. Page_Load
2. Page_Unload
3. Control Event
4. Page_Init

What is the order of their execution?

Answer

Correct Answer: 4,1,3,2

Note: This Question is unanswered, help us to find answer for this one

28.

You are creating an ASP.net application to enter timesheet data intuitively. Users will enter data using a DataGrid. You have added a button column to your DataGrid. The button column uses a custom button to allow users to initiate some calculations on the data in the grid. Which event does the DataGrid control raise when the custom button is clicked?

Answer

Correct Answer: ItemCommand

Note: This Question is unanswered, help us to find answer for this one

29.

You are creating an ASP.NET application that will record each customer's entry. It is possible that thousands of entries could be posted at any given time. Your application will be hosted on twenty Web servers. As customers enter information into your application, maintaining state information will be important. This information should be stored securely and should be capable of being restored in the event that a Web server is restarted. Customers will enter data into three separate pages in your application. Which of the following methods of storing state information would best suit the situation?

Answer

Correct Answer: SQL Server

Note: This Question is unanswered, help us to find answer for this one

30.

You want to create a cookie object named "CustomerAddress" of type "CustomerInfo" to maintain address information of customers who buy products online. Which of the following code snippets should you use to create this cookie?

Answer

Correct Answer: Dim CustomerAddress As New HttpCookie("CustomerInfo")

Note: This Question is unanswered, help us to find answer for this one

31.

You are debugging a Visual Basic.NET application. You add a variable to the watch window. When Visual Basic enters break mode, the Value of the expression variable is "". What is the most likely cause of the problem?

Answer

Correct Answer: The variable is not currently in scope.

Note: This Question is unanswered, help us to find answer for this one

32.

You need to install an online parcel tracking application and its supporting assemblies so that the application and its assemblies can be uninstalled using the Add/Remove Programs Control Panel applet. What should you do?

Answer

Correct Answer: Use a Web installation package to install the Web application and the supporting assemblies.

Note: This Question is unanswered, help us to find answer for this one

33.

In SQL Server, you should avoid the use of cursors because:

Answer

Correct Answer: Programs with cursors take more time to run, hence performance degrades

Note: This Question is unanswered, help us to find answer for this one

34.

What is the total no. of events in Global.asax file in Asp.NET?

Answer

Correct Answer: 19

Note: This Question is unanswered, help us to find answer for this one

35.

You are creating an ASP.NET page for Premium Consultants. You create a GridView control that displays past purchases made by the user. The GridView control is populated from an existing database when the page is created. The page contains TextBox controls that allow users to update their personal information, such as address and telephone number. You need to ensure that the page is refreshed as quickly as possible when users update their contact information.

 What should you do?

Answer

Correct Answer: Write code in the Page.Load event handler that populates the GridView control only when the IsPostBack property of the page is false.

Note: This Question is unanswered, help us to find answer for this one

36.

Which of the following connectionstring in Web.Config is correct if Microsoft SQL Server database named ClassList resides on a server named Neptune is to be used?

Answer

Correct Answer: <add key="SqlConnect" value="Data Source=Neptune;Initial Catalog=ClassList;Persist Security Info=True;User ID=xyz;Password=abc">

Note: This Question is unanswered, help us to find answer for this one

37.

You create an ASP.NET page named ProjectCalendar.aspx that shows scheduling information for projects in your company. The page is accessed from various other ASP and ASP.NET pages hosted throughout the company's intranet. All employees on the intranet use Internet Explorer. ProjectCalendar.aspx has a Calendar control at the top of the page. Listed below the Calendar control is detailed information about project schedules on the data selected. When a user selects a date in the calendar, the page is refreshed to show the project schedule details for the newly selected date. Users report that after viewing two or more dates on ProjectCalendar.aspx, they need to click the browser's Back button several times in order to return to the page they were viewing prior to accessing ProjectCalendar.aspx.

 You need to modify ProjectCalendar.aspx so that the users need to click the Back button only once. What to do?

Answer

Correct Answer: Add the following attribute to the Page Directive for ProjectCalendar.aspx: SmartNavigation="True"

Note: This Question is unanswered, help us to find answer for this one

38.

Which of the following is not a valid binary datatype in SQL Server?

Answer

Correct Answer: TESTAMP

Note: This Question is unanswered, help us to find answer for this one

39.

Which of the following is not a global variable?

Answer

Correct Answer: All are valid global variables

Note: This Question is unanswered, help us to find answer for this one

40.

What does referential integrity (also called relational integrity) prevent?

Answer

Correct Answer: One-to-many or many-to-many relationships between columns in a table

Note: This Question is unanswered, help us to find answer for this one

41.

How can you view the structure of a table named “myTable” in SQL Server?

Answer

Correct Answer: sp_columns myTable

Note: This Question is unanswered, help us to find answer for this one

42.

What is the maximum value that can be stored for a datetime field?

Answer

Correct Answer: Dec 31, 9999

Note: This Question is unanswered, help us to find answer for this one

43.

What is the correct SQL syntax for returning all the columns from a table named “Persons” sorted REVERSE alphabetically by “FirstName”?

Answer

Correct Answer: SELECT * FROM Persons ORDER BY FirstName DESC

Note: This Question is unanswered, help us to find answer for this one

44.

Which of the following commands is used to change the structure of table?

Answer

Correct Answer: ALTER TABLE

Note: This Question is unanswered, help us to find answer for this one

45.

Which one of the following must be specified in every DELETE statement?

Answer

Correct Answer: Table Name

Note: This Question is unanswered, help us to find answer for this one

46.

Which of the following are not date parts?

Answer

Correct Answer: Quarter

Note: This Question is unanswered, help us to find answer for this one

47.

Which of the following statements about SQL Server comments is false?

Answer

Correct Answer: // is used for single line comments

Note: This Question is unanswered, help us to find answer for this one

48.

Which of the following is not a valid character datatype in SQL Server?

Answer

Correct Answer: VARTEXT

Note: This Question is unanswered, help us to find answer for this one

49.

You are developing a website that has four layers. The layers are user interface (web pages), business objects, data objects, and database. You want to pass data from the database to controls on a web form. What should you do?

Answer

Correct Answer: Populate the data objects with data from the database. Populate the business objects with data from the data objects. Populate the controls with values retrieved from the business objects

Note: This Question is unanswered, help us to find answer for this one

50.

How you will generate a report with minimum network traffic?

Answer

Correct Answer: Use Microsoft SQL Server indexes to optimize the data calculations

Note: This Question is unanswered, help us to find answer for this one

51.

Which of the following is the syntax for creating an Index?

Answer

Correct Answer: CREATE [UNIQUE] INDEX index_name ON tbl_name (index_columns)

Note: This Question is unanswered, help us to find answer for this one

52.

In SQL Server, which of the following is not a control statement?

Answer

Correct Answer: begin...end

Note: This Question is unanswered, help us to find answer for this one

53.

What will happen if you query the emp table as shown below:

select empno, DISTINCT ename, Salary from emp;

Answer

Correct Answer: No values will be displayed because the statement will return an error

Note: This Question is unanswered, help us to find answer for this one

54.

How can you change "Hansen" into "Nilsen" in the LastName column in the Persons Table?

Answer

Correct Answer: UPDATE Persons SET LastName = 'Nilsen' WHERE LastName = 'Hansen'

Note: This Question is unanswered, help us to find answer for this one

55.

Choose the appropriate query for the Products table where data should be displayed primarily in ascending order of the ProductGroup column. Secondary sorting should be in descending order of the CurrentStock column

Answer

Correct Answer: Select * from Products order by ProductGroup,CurrentStock DESC

Note: This Question is unanswered, help us to find answer for this one

56.

Consider the following two tables:

1. customers( customer_id, customer_name)

2. branch ( branch_id, branch_name )

What will be the output if the following query is executed:

Select *, branch_name from customers,branch

Answer

Correct Answer: It will return the fields customer_id, customer_name, branch_id, branch_name, branch_name

Note: This Question is unanswered, help us to find answer for this one

57.

You use a Command object to retrieve employee names from the employee table in the database. Which of the following will be returned when this command is executed using ExecuteReader method?

Answer

Correct Answer: DataReader

Note: This Question is unanswered, help us to find answer for this one

58.

The STUDENT_GRADES table has these columns:

STUDENT_ID        INT

SEMESTER_END        DATETIME

GPA                FLOAT

Which of the following statements finds the highest Grade Point Average (GPA) per semester?

Answer

Correct Answer: SELECT MAX(gpa) FROM student_grades WHERE gpa IS NOT NULL GROUP BY semester_end

Note: This Question is unanswered, help us to find answer for this one

59.

Consider the transaction:

Begin Transaction

      Create table A ( x smallint, y smallint)

      Create table B ( p smallint, q smallint)

 

        Update A set x=600 where y > 700

        Update B set p=78 where q=99

 

          If @@ error != 0

          Begin

          RollBack Transaction

            Return

          End

 

     Commit Transaction

Select the correct option:

Answer

Correct Answer: It will report an error

Note: This Question is unanswered, help us to find answer for this one

60.

The sales database contains a customer table and an order table. For each order there is one and only one customer, and for each customer there can be zero or more orders. How should primary and foreign key fields be placed into the design of this database?

Answer

Correct Answer: A primary key should be created for the customer_id field in the customer table and a foreign key should be created for the customer_id field in the order table

Note: This Question is unanswered, help us to find answer for this one

61.

Examine the data in the EMPLOYEES table given below:

LAST_NAME  DEPTARTMENT_ID     SALARY

ALLEN                10                      3000

MILLER              20                     1500

King                   20                      2200

Davis                 30                      5000

Which of the following Subqueries work?

Answer

Correct Answer: SELECT * FROM employees where salary > (SELECT MIN(salary) FROM employees GROUP BY department_id);

Note: This Question is unanswered, help us to find answer for this one

62.

Examine the two SQL statements given below:

SELECT last_name, salary, hire_date FROM EMPLOYEES ORDER BY salary DESC

SELECT last_name, salary, hire_date FROM EMPLOYEES ORDER BY 2 DESC

What is true about them?

Answer

Correct Answer: The two statements produce identical results

Note: This Question is unanswered, help us to find answer for this one

63.

Which operator will be evaluated first in the following statement?

select (age + 3 * 4 / 2 - 8) from emp

Answer

Correct Answer: *

Note: This Question is unanswered, help us to find answer for this one

64.

In a SQL Server query, what will the output be if you try to perform arithmetic on NULL values?

Answer

Correct Answer: NULL

Note: This Question is unanswered, help us to find answer for this one

65.

You want to access data from the "Customer" table in the database. You generate a DataSet named "MyDataSet" by adding "Customer" table to it. Which of the following statements should you use to load the data from the database into "MyDataSet" which has been loaded with multiple tables, using a SqlDataAdapter named "MyAdapter"

Answer

Correct Answer: MyAdapter.Fill(MyDataSet,"Customer")

Note: This Question is unanswered, help us to find answer for this one

66.

Which of the following queries is valid?

Answer

Correct Answer: Select name from students group by subject, name;

Note: This Question is unanswered, help us to find answer for this one

67.

You are using Visual Basic to retrieve class information from a Microsoft SQL Server database named ClassList. The database Resides on a server named Neptune. Which code fragment will create a connection to this data source?

Answer

Correct Answer: Set conn = New connection ; With conn ; .Provider = "SqlOleDB" ; ConnectionString ="User ID=sa;"&& "Data Source= Neptune;"&& "Initial Catalog=ClassList"

Note: This Question is unanswered, help us to find answer for this one

68.

When designing a database table, how do you avoid missing column values for non-primary key columns?

Answer

Correct Answer: Use DEFAULT and NOT NULL constraints

Note: This Question is unanswered, help us to find answer for this one

69.

A company has the following departments:

Marketing, Designing, production, Packing

What will be the result of the following query?

select * from table where department < 'marketing';

Answer

Correct Answer: The query will return "Designing"

Note: This Question is unanswered, help us to find answer for this one

70.

Which of the following objects is required by the Dataset to retrieve data from a database and to save updated data back to the database?

Answer

Correct Answer: DataAdapter

Note: This Question is unanswered, help us to find answer for this one

71.

Examine the description of the STUDENTS table:

STD_ID                INT

COURSE_ID        VARCHAR (10)

START_DATE        DATETIME

END_DATE        DATETIME

 

The aggregate functions valid on the START_DATE column are:

Answer

Correct Answer: COUNT(start_date)

Note: This Question is unanswered, help us to find answer for this one

72.

What is wrong with the following query?

select * from Orders where OrderID = (select OrderID from OrderItems where ItemQty > 50)

Answer

Correct Answer: The sub query can return more than one row, so, '=' should be replaced with 'in'

Note: This Question is unanswered, help us to find answer for this one

73.

Consider the following queries:

1. select * from employee where department LIKE "[^F-M]%";

2. Select * from employee where department = "[^F-M]%";

Select the correct option:

Answer

Correct Answer: Query 2 is perfectly correct

Note: This Question is unanswered, help us to find answer for this one

74.

Which line of code should you use to copy the edited rows from dataset productInfo into another dataset productChanges?

Answer

Correct Answer: productChanges = productInfo.GetChanges()

Note: This Question is unanswered, help us to find answer for this one

75.

Is it possible to insert several rows into a table with a single INSERT statement?

Answer

Correct Answer: Yes

Note: This Question is unanswered, help us to find answer for this one

76.

Is the FROM clause necessary in every SELECT statement?

Answer

Correct Answer: No

Note: This Question is unanswered, help us to find answer for this one

77.

The simplest query must include at least________ and _________?

Answer

Correct Answer: A select clause

Note: This Question is unanswered, help us to find answer for this one

78.

Which of the following datatypes is not supported by SQL-Server?

Answer

Correct Answer: Logical

Note: This Question is unanswered, help us to find answer for this one

79.

Which query will display data from the Pers table relating to Analysts, clerks and Salesmen who joined between 1/1/2005 and 1/2/2005?

Answer

Correct Answer: select * from Pers where joining_date between '1/1/2005' and '1/2/2005' and (job= 'Analyst' or 'clerk' or 'salesman')

Note: This Question is unanswered, help us to find answer for this one

80.

In which sequence are queries and sub-queries executed by the SQL Engine?

Answer

Correct Answer: sub sub query -> sub query -> prime query

Note: This Question is unanswered, help us to find answer for this one

81.

Which of the following constraints can be used to enforce the uniqueness of rows in a table?

Answer

Correct Answer: PRIMARY KEY and UNIQUE constraints

Note: This Question is unanswered, help us to find answer for this one

82.

Which of the following has the highest order of precedence in SQL Server?

Answer

Correct Answer: Functions and Parenthesis

Note: This Question is unanswered, help us to find answer for this one

83.

It is time for the annual sales awards at your company. The awards include certificates awarded for the five sales of the highest sale amounts. You need to produce a list of the five highest revenue transactions from the Orders table in the Sales database. The Orders table is defined as follows:

CREATE TABLE Orders (        

OrderID Int IDENTITY NOT NULL,       

 SalesPersonID Int NOT NULL,       

 RegionID Int NOT NULL,        

OrderDate Datetime NOT NULL,        

 

OrderAmount Int NOT NULL )

Which statement will produce the report correctly?

Answer

Correct Answer: SELECT TOP 5 OrderAmount, SalesPersonID FROM orders ORDER BY OrderAmount DESC

Note: This Question is unanswered, help us to find answer for this one

84.

What is the correct SQL syntax for selecting all the columns where the "LastName" is alphabetically between (and including) "Hansen" and "Pettersen"?

Answer

Correct Answer: SELECT * FROM Persons WHERE LastName BETWEEN 'Hansen' AND 'Pettersen'

Note: This Question is unanswered, help us to find answer for this one

85.

Which of the following are aggregate functions in SQL?

Answer

Correct Answer: Avg

Note: This Question is unanswered, help us to find answer for this one

86.

Examine the code given below:

SELECT employee_id FROM employees WHERE commission_pct=.5 OR salary > 23000

Which of the following statements is correct with regard to this code?

Answer

Correct Answer: It returns employees who have 50% commission rate or salary greater than $23,000

Note: This Question is unanswered, help us to find answer for this one

87.

Which of the following is not a valid SQL OPERATOR?

Answer

Correct Answer: All of the above are valid

Note: This Question is unanswered, help us to find answer for this one

88.

Which of the following scenarios are applicable to Window Workflow Foundation?

Answer

Correct Answer: Document-centric workflows

Note: This Question is unanswered, help us to find answer for this one

89.

In ASP.NET, the exception handling should be used?

Answer

Correct Answer: To signal the occurrence of unusual or unanticipated program events

Note: This Question is unanswered, help us to find answer for this one

90.

Which of the following directives can be used to include libraries in an ASP.NET page?

Answer

Correct Answer: Import

Note: This Question is unanswered, help us to find answer for this one

91.

When you make some changes to the configuration file, do you need to stop and start IIS to apply the new settings?

Answer

Correct Answer: No

Note: This Question is unanswered, help us to find answer for this one

92.

Consider the following two statements and choose the most appropriate option:

1. For configuration, ASP.NET uses IIS Metabase

2. For configuration, ASP.NET uses an XML based configuration system

Answer

Correct Answer: 2 only

Note: This Question is unanswered, help us to find answer for this one

93.

How can you view the results of Trace.Write() statements?

Answer

Correct Answer: By enabling page tracing

Note: This Question is unanswered, help us to find answer for this one

94.

Which of the following is the way to handle Unmanaged Code Exceptions in ASP.NET?

Answer

Correct Answer: Server.GetLastError()

Note: This Question is unanswered, help us to find answer for this one

95.

Which of the following is not a valid directive in ASP.NET?

Answer

Correct Answer: @Insert

Note: This Question is unanswered, help us to find answer for this one

96.

In ASP.NET, which of the following is not an event of the Page class?

Answer

Correct Answer: Abort

Note: This Question is unanswered, help us to find answer for this one

97.

Which of the following are the valid methods of the SqlTransaction class?

Answer

Correct Answer: Commit

Note: This Question is unanswered, help us to find answer for this one

98.

In which of the following namespaces is the Assembly class defined?

Answer

Correct Answer: System.Reflection

Note: This Question is unanswered, help us to find answer for this one

99.

Which DLL is responsible for processing the page requests running on the server?

Answer

Correct Answer: Internet Server Application Programming Interface

Note: This Question is unanswered, help us to find answer for this one

100.

Which of following is correct if you want to import a C# class called myClass that is implemented in the myClass.cs file into a .aspx page?

Answer

Correct Answer: <%@Page Inherits="myClass" Src="myClass.cs" %>

Note: This Question is unanswered, help us to find answer for this one

101.

What data types do the RangeValidator control support?

Answer

Correct Answer: Integer, String, and Date

Note: This Question is unanswered, help us to find answer for this one

102.

What will happen if the Server configuration file and the Application configuration file have different values for session state?

Answer

Correct Answer: The Server configuration will override the Application configuration if allowOverride is set to "false" in the settings in the Server configuration file

Note: This Question is unanswered, help us to find answer for this one

103.

What does the following line of code do?

<%@ Register tagprefix="ril" Tagname="test" Src="rilTest.ascx" %>

Answer

Correct Answer: Register a new user control

Note: This Question is unanswered, help us to find answer for this one

104.

Which of the following is not a service provided by Common Language Runtime (CLR)?

Answer

Correct Answer: Multiple platform support

Note: This Question is unanswered, help us to find answer for this one

105.

In ASP.NET, the control's value set during the postback can be accessed in?

Answer

Correct Answer: Page_Load

Note: This Question is unanswered, help us to find answer for this one

106.

How can you pop-up a window to display text that identifies the author of the book?

Answer

Correct Answer: In the onmouseover event handler for each image, add code that calls the RaiseBubbleEvent() method of the System.Web.UI.WebControls.Image class.

Note: This Question is unanswered, help us to find answer for this one

107.

Consider the following two statements relating to ASP.NET and choose the most appropriate option?

Statement 1: Value types are allocated on a stack

Statement 2: Reference types are allocated on a managed CLR Heap

Answer

Correct Answer: Both statements 1 and 2 are true

Note: This Question is unanswered, help us to find answer for this one

108.

You are developing an application to take orders over the Internet. When the user posts back the order form, you first check to see whether he is a registered customer of your company. If not, you must transfer control to the Register html page. Which method should you use to effect this transfer?

Answer

Correct Answer: Response.Redirect()

Note: This Question is unanswered, help us to find answer for this one

109.

You are creating an ASP.NET application that will run on your company's intranet. You want to control the browser window and respond immediately to non-post-back events. Which should you use?

Answer

Correct Answer: Client-side scripts

Note: This Question is unanswered, help us to find answer for this one

110.

You are creating an ASP.NET application for AutoMart Internet Web site. A toolbar is required that will be displayed at the top of each page in the Web site. The toolbar will contain only static HTML code. The toolbar will be used in only AutoMart website. You plan to create the toolbar as a reusable component for your application. You need to create the toolbar in a minimum possible time. Which method will you adopt?

Answer

Correct Answer: Add a new Web user control to your ASP.NET project. Create the toolbar within the Web user control.

Note: This Question is unanswered, help us to find answer for this one

111.

Which of the following are not true in ASP.NET?

Answer

Correct Answer: Every try block must have a catch block

Note: This Question is unanswered, help us to find answer for this one

112.

You create an ASP.NET application for ABC Corporation. The project manager requires a standard appearance for all Web applications. Standards are expected to change periodically. You need to enforce these standards and reduce maintenance time. What would you do?

Answer

Correct Answer: Create a cascading style sheet

Note: This Question is unanswered, help us to find answer for this one

113.

You create an ASP.NET application for an online insurance site PremiumInsurance. A page named PersonalDetails.aspx has the following Page directive:

<%@ Page Language="VB" CodeBehind="PersonalDetails.aspx.vb" AutoEventWireup="false" inherits="InsApp.PersonalDet"%> PersonalDetails.aspx had a TextBox control named MemberID in which the user can enter a Personal MemberID. The HTML code for this control is as follows: <asp:TextBox ID="MemberID" Columns="20" Runat="server"/> You need to implement a TextChanged event handler for MemberID. You want this event handler to retrieve information about a person by using an XML Web service that charges for each access. The page will then be redisplayed with additional information about the vehicle obtained from the XML Web service. You are implementing the TextChanged event handler. Which two courses of action should you take? (Each correct answer presents part of the solution. Choose two)

Answer

Correct Answer: In the Page directive for PersonalDetails.aspx, ensure that the AutoEventWireup attributes is set to "true".

Note: This Question is unanswered, help us to find answer for this one

114.

Which of the following are false for ASP.NET events?

Answer

Correct Answer: All of the above are true

Note: This Question is unanswered, help us to find answer for this one