Home
MCQS
ASP.Net MCQ Quiz Hub
ASP.Net Mcq Question Set 11
Choose a topic to test your knowledge and improve your ASP.Net skills
1. What attribute must be set on a validator control for the validation to work?
Validate
. ValidateControl
ControlToBind
ControlToValidate
2. Which of the following contains web application settings?
app.config
web.config
assembly.config
machine.config
3. What is default time of expire session?
20 minute
40 minute
100 minute
1200 hours
4. In Which Page Cycle All Controls Are Fully Loaded?
Page_Load()
Page_Init()
Page_Render()
Page_Unload()
5. The public methods and properties of a master page can be accessed in a content page by assigning a class name to the master page. Which directive can be used to assign a class name to the master page?
<%@ Control %>
<%@ Master %>
<%@ MasterType %>
<%@ Page %>
6. What DataType is return in IsPostback property?
bit
Boolean
int
Strings
7. Which method do you invoke on the Data Adapter control to load your generated dataset?
Fill( )
Read( )
ExecuteQuery( )
None of these
8. Which of the following is not a valid statement in ASP.Net?
Server.Transfer(“SomePage.aspx”);
Response.Redirect(“SomePage.aspx”);
Server.Redirect(“SomePage.aspx”);
Server.Execute(“SomePage.aspx”);
9. How do you explicitly kill a user’s session ?
Session.Close()
Session.Discard()
Session.Abandon()
Session.End()
10. Which data control does not exist in asp.net
GridView
DataList
Repeater
tableView
11. Which control would you use if you needed to make sure the values in two different controls matched?
Required Field Validator
Custom Validator control
. CompareValidator control
Regular expression validator Control
12. Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box?
DataTextField property.
DataValueField Property
DataMember
None of these
13. Difference between response.redirect and server.transfer.
response.redirect will take you to another page with out round trip
server.transfer will take the round trip from server to client
all the above
None of these
14. You have created a new ASP.Net web application. You build the solution in Visual Studio .Net. You notice that there is a /bin directory under the virtual directory. Which type of files should you place in this location?
Assemblies that are used on only this one web application
Assemblies that are used on web sites on only this web server machine.
. Assemblies that are used by web applications anywhere on the network
Assemblies that are XCOPY’d to the location.
15. Which is not a validation control?
Required Field Validator
Compare Validator
Error Validator
Regular Expression Validator
16. When will a session be started in an application?
Before Application Started
After Application Started
When the Client first sends a request to browser
While closing the application
17. Which control is used to sort the data and allow paging?
. Datalist
Repeater Control
DataGrid
None of these
18. What is the Web.config file used for?
To store the global information and variable definitions for the application
Configures the time that the server-side codebehind module is called
To configure the web server
To configure the web browser
19. Which are the two properties of a Datagrid that has to be specified to turn on sorting and paging respectively?
EnableSorting=”true” and EnablePaging=”true”
. DisableSorting=”false” and DisablePaging=”false”
. AllowSoring=”true” and allowPaging=”true”
EnableSorting=”true” and allowPaging=”true”
20. Which namespace is used when we connect our asp.net page to sql server
System.data.sqlclient
System.data.sql
System.sqlserver
System.url
21. Which of the following is not supported for IIS?
Windows XP Professional
Windows XP Home
Windows 2003 Server
Windows 2000 Server
22. The process in which a web page sends data back to the same page on the server is called?
PostBack
Session
Query strings
All the above
23. After capturing the SelectedIndexChanged event for a ListBox control, you find that the event handler doesn’t execute. What could the problem be?
The AutoEventWireup attribute is set to False
The AutoPostBack attribute is set to False
The codebehind module is not properly compiled
. The ListBox must be defined WithEvents
24. What’s the difference between Response.Write() and Response.Output.Write()?
Both are Same
.Write Formatted Output
Write data to a file
None of these
25. When the page processing cycle of ViewState is available?
Before init and After Page_Load() / OnLoad()
Before Page_Load() / OnLoad() and Before Init()
After Init() and Before Page_Load() / OnLoad()
After Init() and After Page_Load() / OnLoad()
26. Which method do you invoke on the DataAdapter control to load your generated dataset with data?
DataBind()
Populate()
Bind
Fill()
27. Can you edit data in the Repeater control?
True
False
all of the above
none of the mentioned
28. Which template must you provide, in order to display data in a Repeater control?
EditItemTemplate
ItemTemplate
all of the above
None of the above.
29. What base class do all Web Forms inherit from?
The Page class.
The Form class
The Session
All of the mentioned
30. . Advantages of WCF over Web Services? (Windows communication Foundation)
WCF can create services similar in concept to ASMX
WCF is implemented on pipeline
WCF is more secure, reliable
All the above
31. . what is its lifetime of a Static variable?
Can Be accessed even Outside of the Program
Throughout the execution of a program
Inside a function
none of the above
32. What is the root namespace for all types?
Root
. System
Parent
Web
33. An abstract class is one in which methods are defined but an object of this class cannot be instantiated. This type of a class can only be derived but cannot be instantiated.
true
False
all of the above
None of the mentioned
34. What is a Managed Data ?
Memory allocation/de-allocation is done by user
Memory allocation/ de-allocetion is done by CLR itself
all of the above
None of the mentioned
35. Viewstate is the mechanism that automatically saves the values of the page's items just after rendering the page. It stores items added to a page’s ViewState property as hidden fields on the page.
True
False
all of the above
None of the mentioned
36. Application domain is a way in CLR to maintain a boundary between various applications to ensure that they do not interfere in working of any other application.
True
False
all of the above
None of the mentioned
37. Singleton architecture is to be used when all the applications have to use or share same data.
True
False
all of the above
None of the mentioned
38. Which statements are correct about asp.net AJAX ?
. ASP.NET AJAX is the name of Microsoft’s AJAX solution
AJAX refers to a set of client and server technologies that focus on improving web development with Visual Studio.
Microsoft AJAX Library is a JavaScript library that works on a variety of browsers and serves to simplify JavaScript development.
all the above
39. Can We Pass parameter to Crystal Report (.rpt) File ?
Yes
No
None of the above
All of the Mentioned
40. Which property common in every validation control?
ValueToCompare
ValidationExpression
ControlToValidate
. InitialValue
41. An organization has developed a web service in which the values of the forms are validated using ASP.NET application.Suppose this web service is got and used by a customer then in such a scenario which of the following is TRUE
The customer must be having technology that run ASP.
Such a situation cannot happen at all
The customer can run on any platform.
none of the above
42. How many types of cookies are there?
1
2
3
4
43. What’s the .NET collection class that allows an element to be accessed using a unique key?
List
HashTable
ArrayList
Arry
44. What’s the top .NET class that everything is derived from?
System.Object
System
System.Data
System.net
45. What is the event that is fired when an unhandled exception is encountered within the application?
Page_Error
Application_Error
Application_Disposed
System_Error
46. If cookies are not enabled at browser end does form Authentication work?
. Yes
No
Both Yes And NO
none of the above
47. Can you prevent your class from being inherited by another class?
Yes
no
all of the above
None of the mentioned
48. What are WebMethod attribute properties
[WebMethod(EnableSession ="true")]
[WebMethod(MessageName = "SinInt")]
[WebMethod(TransactionOption = "Supported")]
All The About
49. You are developing an asp.net page for www.abc.com , in that page you need to provide an option to redirect to a web page that is in www.def.com. Which method you should use to perform the task
Server.Transfer()
Response.Redirect()
Response.Transfer()
Request.Redirect()
50. Team foundation is a ________ tier architecture
One
Two
Three
None
Submit