Professional Documents
Culture Documents
NET + C#
1) Which of the following languages can be used to write server side scripting in ASP.NET?
a) C-sharp
b) VB
c) C++
d) a and b
2) When an .aspx page is requested from the web server, the output will be rendered to browser in
following format.
a) HTML
b) XML
c) WML
d) JSP
3) The Asp.net server control, which provides an alternative way of displaying text on web page, is
a) < asp:label >
b) < asp:listitem >
c) < asp:button >
6) What namespace does the Web page belong in the .NET Framework class hierarchy?
a) System.web.UI.Page
b) System.Windows.Page
c) System.Web.page
7) Which method do you invoke on the Data Adapter control to load your generated dataset?
a) Fill( )
b) ExecuteQuery( )
c) Read( )
8) How do you register a user control?
a) Add Tag prefix, Tag name
b) Add Source, Tag prefix
c) Add Src, Tagprefix, Tagname
18) The number of forms that can be added to a aspx page is.
a) 1
b) 2
c) 3
d) More than 3
20) Which property of the session object is used to set the local identifier?
a) SessionId
b) LCID
c) Item
d) Key
24) Does the EnableViewState allows the page to save the users input on a form?
a) Yes
b) No
26) What is the maximum number of cookies that can be allowed to a web site?
a) 1
b) 10
c) 20
d) More than 30
27) Select the control which does not have any visible interface.
a) Datalist
b) DropdownList
c) Repeater
d) Datagrid
35) A Constructor
a) is used to create objects
b) must have the same name as the class it is declared within
c) maybe overloaded
d) b and c
e) all of the above
38) Defining two methods with the same name but with different parameters is called.
a) Loading
b) Overloading
c) Multiplexing
d) Duplexing
39) Find any errors in the following BankAccount constructor: Public int BankAccount() { balance = 0;
}
a) Name
b) Formal parameters
c) Return type
d) No errors
40) In the body of a method, C# uses the variable named_____to refer to the current object whose
method is being invoked.
a) call
b) this
c) do
d) that
42) An Event is
a) The result of a users action
b) result of a party
c) code to force users action
44) Is it possible to pass methods as arguments for other methods without modification.
a) True
b) False
46) What is the proper header for a class that intends to use an interface.
a) class MyClass IFace
b) class MyClass ; IFace
c) class MyClass : IFace
d) class MyCalss {IFace}
e) class MyCalss(IFace)
53) Methods that are declared abstract in the base class must show implementation at the time of
declaration.
a) True
b) False
55) Assuming that public class B : A { public B(int i) :base(i) { } } compiles and runs correctly, what
can we conclude about the constructors in the class A?
a) One constructor takes an argument of type i
b) There is only a default constructor
c) One constructor takes an arguments of the type int
d) a and b
56) Classes declared with the sealed keyword cannot be base class.
a) True
b) False
57) A method_____an exception when that method detects that a problem has occured.
a) Trys
b) Catches
c) Throws
d) a and b