0% found this document useful (0 votes)
66 views

With SQL Server With Key

The document contains questions about ASP.NET concepts and syntax. It includes 15 multiple choice questions related to topics like events, controls, validation, configuration, and more.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views

With SQL Server With Key

The document contains questions about ASP.NET concepts and syntax. It includes 15 multiple choice questions related to topics like events, controls, validation, configuration, and more.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Quizack.

com

ASP.NET with SQL Server Exam

Question No. 1

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

A: Events are specialized forms of delegates

B: Events are used to support the callback event notification model

C: The signature of any event handler is fixed

om
D: All of the above are true

Question No. 2
.c
You create an ASP.NET application for an online insurance site PremiumInsurance. A page
ck
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
za

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
ui

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)
Q

A: In the Page directive for PersonalDetails.aspx, ensure that the


AutoEventWireup attributes is set to "true".

B: In the Page directive for PersonalDetails.aspx, ensure that the


EnableViewState attribute is set to "true".

C: In the MemberID HTML element, ensure that the AutoPostback attribute is


set to "false". Include code for the client-side onserverchange event to submit
the Web Form for processing by theserver

D: In the MemberID HTML element, ensure that the AutoPostback attribute is


set to "true". Include code in the TextChanged event handler to query the XML

Page 1 of 14
Quizack.com
Web service

Question No. 3

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?

A: Create a Microsoft Visual Studio .NET Enterprise template

om
B: Create a sample HTML page

C: Create a sample ASP.NET Web form

D: Create a cascading style sheet


.c
ck
Question No. 4

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


za

A: A try block can have more than one catch blocks


ui

B: Every try block must have a catch block

C: Every try block must have a finally block


Q

D: All exception classes are to be derived from System.Exception

Question No. 5

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?

Page 2 of 14
Quizack.com

A: Add a new component class to your ASP.NET project. Use HTML server
controls to design the toolbar within the designer of the component class.

B: Create a new Web Control Library project. Create the toolbar within a Web
custom control.

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

D: Add a new Web Form to your ASP.NET project. Use HTML server controls to
design the toolbar within the Web Form and save the Web Form with an ascx
extension

om
Question No. 6

.c
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?
ck
A: Server-side code
za

B: Use the Browser object's VBScript or JavaScript properties to test if the


browser can run scripts

C: Use the Browser object's Cookies


ui

D: Client-side scripts
Q

Question No. 7

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?

A: Response.Redirect()

B: Server.Transfer()

Page 3 of 14
Quizack.com

C: Server.Execute()

D: Page.ProcessRequest()

Question No. 8

Consider the following two statements relating to ASP.NET and choose the most appropriate
option?
Statement 1: Value types are allocated on a stack

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

A: Statement 1 is true and statement 2 is false

B: Statement 2 is true and statement 1 is false

C: Both statements 1 and 2 are true


.c
ck
D: Both statements 1 and 2 are false
za

Question No. 9

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

A: For each image, set the AlternateText property to specify the text you want
to display, and set the ToolTip property to True.
Q

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

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

D: For each image, set the ToolTip property to specify the text you want to
display.

Question No. 10
Page 4 of 14
Quizack.com
In ASP.NET, the control's value set during the postback can be accessed in?

A: Page_Init

B: Page_Load

C: Both Page_Init and Page_Load

D: Neither in Page_Load nor Page_Init

om
Question No. 11

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

A: Garbage collection .c
ck
B: Multiple platform support

C: Code verification
za

D: Code access security


ui

Question No. 12

What does the following line of code do?


Q

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

A: Register a new web site

B: Register a new tag

C: Register a new user control

D: Register a new web page

Page 5 of 14
Quizack.com

Question No. 13

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

A: The Server configuration will always override the Application configuration

B: The Application configuration will always override the Server configuration

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

D: The Application configuration will override the Server configuration if


allowOverride is set to "false" in the settings in the Server configuration file

.c
ck
Question No. 14

What data types do the RangeValidator control support?


za

A: Integer, String, and Date

B: char, String, and Date


ui

C: Integer, String, and varchar


Q

D: Integer, bool, and Date

Question No. 15

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?

A: <%@Page Import="myClass" Src="myClass.cs" %>

Page 6 of 14
Quizack.com

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

C: <%@Page Include="myClass" Src="myClass.cs" %>

D: <%@Page Insert="myClass" Src="myClass.cs" %>

Question No. 16

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

om
A: Internet Server Application Programming Interface

B: Internet Information Server Program

C: Webserver interface
.c
ck
D: IIS Application
za

Question No. 17

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


ui

A: System.Assembly
Q

B: System.Reflection

C: System.Collections

D: System.Object

Question No. 18

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

Page 7 of 14
Quizack.com

A: Commit

B: Terminate

C: Save

D: Close

E: Rollback

om
Question No. 19

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

A: Init
.c
ck
B: Load

C: Error
za

D: Abort
ui

Question No. 20

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


Q

A: @Page

B: @Implements

C: @Insert

D: @Register

E: @Reference

Page 8 of 14
Quizack.com

Question No. 21

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

A: Server.GetLastError()

B: Exception ex

om
C: Exception ex

D: None of above

Question No. 22 .c
ck
How can you view the results of Trace.Write() statements?

A: By enabling page tracing


za

B: By enabling application tracing

C: By enabling server tracing


ui

D: By looking up the system.log file


Q

Question No. 23

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

A: 1 only

B: 2 only

Page 9 of 14
Quizack.com

C: Both 1 and 2

D: Neither 1 nor 2

Question No. 24

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

om
A: Yes

B: No

Question No. 25
.c
ck
Which of the following directives can be used to include libraries in an ASP.NET page?

A: Include
za

B: Import
ui

C: Insert

D: Both a and b
Q

Question No. 26

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

A: To signal the occurrence of unusual or unanticipated program events

B: To redirect the program's normal flow of control

C: In cases of potential logic or user input errors

Page 10 of 14
Quizack.com

D: In case of overflow of an array boundary

Question No. 27

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

A: Document-centric workflows

om
B: Human workflows

C: User-interface page flows

D: Builtin support for communications across multiple applications and/or


platforms

.c
ck
Question No. 28

The names of those departments where there are more than 100 employees have to be
za

displayed. Given two relations, employees and departments, what query should be used?
Employee
---------
Empno
Employeename
ui

Salary
Deptno
Department
Q

---------
Deptno
Departname

A: Select departname from department where deptno in (select deptnofrom


employee group by deptno having count(*) > 100);

B: Select departname from department where deptno in (select count(*)from


employee group by deptno where count(*) > 100);

C: Select departname from department where count(deptno) > 100;

Page 11 of 14
Quizack.com

D: Select departname from department where deptno in (select count(*)from


employee where count(*) > 100);

Question No. 29

Which of the following is not a valid SQL OPERATOR?

A: Between..and..

om
B: Like

C: In

D: Is null

E: Having
.c
ck
F: Not in

G: All of the above are valid


za

Question No. 30
ui

Consider the query:


SELECT name
Q

FROM Student
WHERE name LIKE '_a%';
Which names will be displayed?

A: Names starting with "a"

B: Names containing "a" as the second letter

C: Names starting with "a" or "A"

D: Names containing "a" as any letter except the first

Page 12 of 14
Quizack.com

om
.c
ck
za
ui
Q

Page 13 of 14
Quizack.com
Answers:
Q:1 D Q:2 A Q:3 D Q:4 B

Q:5 C Q:6 D Q:7 A Q:8 C

Q:9 B Q:10 B Q:11 B Q:12 C

Q:13 C Q:14 A Q:15 B Q:16 A

Q:17 B Q:18 A Q:19 D Q:20 C

Q:21 A Q:22 A Q:23 B Q:24 B

Q:25 B Q:26 A Q:27 A Q:28 A

Q:29 G Q:30 B

om
.c
ck
za
ui
Q

Page 14 of 14

You might also like