wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

ASP. NET QUIZ_1

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Which class is used to read text line by line from a file?

a)

FileStream

b)

file.Readline()

c)

StreamReader

d)

FileInfo

2.

Which of the following is NOT a responsibility of the CLR?

a)

Garbage Collection

b)

Exception Handling

c)

Just-In-Time (JIT) Compilation

d)

Designing User Interface

3.

Which looping statement in C# is best suited when the number of iterations is unknown?

a)

for

b)

while

c)

do....while

d)

switch

4.

Which event of a Button control is fired when a user clicks the button?

a)

OnClick

b)

Oncommand

c)

Onswitch

d)

Onclick

5.

If File.Move("a.txt", "b.txt") is executed, what happens?

a)

File a.txt is moved as b.txt.

b)

File a.txt is moved to b.txt and a.txt is deleted

c)

File b.txt is moved to a.txt and a.txt is deleted

d)

File b.txt is moved to a.txt and b.txt is deleted

6.

The AdvertisementFile property of AdRotator control points to:

a)

Image file containing ad details

b)

xml file containing ad details

c)

css file for styling and add details

d)

a database table

7.

In ASP.NET, GridView control is mainly used for:

a)

Showing hierarchical data

b)

Managing and editing session data

c)

Showing ad data

d)

Displaying and editing tabular data

8.

Which control would you use if you want a user to navigate to another page but also perform a server-side event?

a)

Hyperlink

b)

LinkButton

c)

Button

d)

LinkHyper

9.

What will be the output of the following code?

int a = 5;

int b = 2;

Console.WriteLine(a / b);

a)

2.5

b)

2

c)

3

d)

Error

10.

The Common Language Runtime (CLR) is responsible for:

a)

Compiling C# code into machine code

b)

Memory management and garbage collection

c)

Managing UI elements in ASP.NET

d)

Only converting IL to CIL