Home
MCQS
ASP.Net MCQ Quiz Hub
ASP.Net Mcq Question Set 10
Choose a topic to test your knowledge and improve your ASP.Net skills
1. Which of the following is a requirement when merging modified data into a DataSet?
A primary key must be defined on the DataTable objects
The DataSet schemas must match in order to merge
The destination DataSet must be empty prior to merging
A DataSet must be merged into the same DataSet that created it.
2. Which Kind Of data we can store in viewstate
Viewstate can store only serilizable object
Viewstate can store anything
Viewstate can store onlys string
None
3. What is/are the predefined TraceListener(s) in ASP.Net
TextWriterTraceListener
EventLogTraceListener
DefaultTraceListener
All the above 1, 2,3
4. We have defined one page_load event in aspx page and same page_load event in code behind who will run first?
page_laod event in aspx page
page_load event in code-behind
both will run simultaneously
None
5. Which of the following represents the best use of the Table, TableRow, and Table-Cell controls?
To create and populate a Table in Design view
To create a customized control that needs to display data in a tabular fashion
To create and populate a Table with images
To display a tabular result set
6. How to find out what version of ASP.NET I am using on my machine?
Response.Write(System.Environment.Version.ToString() );
Response.Write(Version.ToString() );
Response.Write(System.Version.ToString() );
Not possible
7. An ASP.NET page uses a Datagrid displays employee information.The Web application supports a large number of concurrent users, who will be saving data from the grid back to the database. It is important that the Web application doesn’t overwhelm the Web Server.
Disable View State and don’t use session state
Use View State
Use URL munging
Disable ViewState and use Session State
8. While creating a Web site with the help of Visual Studio 2005 on a remote computer that does not have Front Page Server Extensions installed, which Web site type will you create in Visual Studio 2005?
HTTP
File
FTP
All of the above
9. What’s the difference between Response.Write() and Response.Output.Write()?
The First one allows you to write formatted output.
The latter one allows you to write formatted output.
No Difference
The latter one allows you to write unformatted output.
10. If I’m developing an application that must accommodate multiple security levels though secure login and my ASP.NET web application is spanned across three web-servers (using round-robin load balancing) what would be the best approach to maintain login-in state for the users?
Maintain the login state security through a database.
Maintain the login state security through a Session.
Maintain the login state security through a View State.
All of the above
11. Where we can assign value to Static read only member variable of a static class?
Default constructor
Parameterized constructor
Global.asax
On click of button
12. Which of these files takes the web application in offline mode?
app_offline.html
app_offline.htm
appoffline.html
None of these
13. Which of these classes maps to the tag <input type=”checkbox”/>
HtmlCheckBox
HtlmInputCheckBox
HtmlControl
None
14. By default, ASP.NET store SessionIDs in ____
Cookies
Cache
Database
Global variable
15. The model is a ____
Shape of data
Html content
Collection of data
Type of data
16. Which namespace is used for ASPX View Engine?
System.Web.Razor
System.Web.Mvc.WebFormViewEngine
Both A &amp; B
None
17. What is ActionResult()?
It is an abstract Class
It is a Concrete Class
Both A and B
None
18. Which of the followings are Actionselectors?
ActionName
NonAction
ActionVerbs
All of the above
19. What are the various types of filters in an ASP.NET MVC application?
Authorization filters
Action filters
Result filters
All of these
20. What is the name of the configuration files that the App_Start folder contains?
BundleConfig.cs
FilterConfig.cs
RouteConfig.cs
All of these
21. WIF enables you to create a custom token. To be able to use the token, you must create a custom token handler by overriding which of the following?
SecurityToken
SecurityTokenHandler
SWTToken
Saml2SecurityTokenHandler
22. What Request Processing technique follows ASP.Net?
Top-Down
Down-Up
Pipeline
Waterfall
23. Does MVC 6 was introduced new JSON project-based structure?
Yes
No
Both A &amp; B
None
24. ___ attributes can be used for data validation in MVC.
DataAnnotations
Fluent API
DataModel
HtmlHelper
25. What is the name of the Page object’s property that determines if a Web page is being requested without data being submitted to the server?
IsCallback
IsReusable
IsValid
IsPostBack
26. How will you specify the Cache Location?
You can use browser settings to specify where a page is cached.
You can use the Location attribute of the &lt;%@ OutputCache %&gt; directive to specify where a page is cached.
You can use the Location attribute in QueryString to specify where a page is cached.
None of the above.
27. Which file you should write for the connection string so that you can access it in all the web pages for the same application?
In App_Data folder
In Web.config file
In MasterPage file
none of the above
28. What is the name of the property of ASP.NET page that you can query to determine that a ASP.NET page is being requested not data being submitted to web server?
FirstGet
Initialized
IncludesData
IsPostBack
29. In order for query string values to be available during page processing, you must submit the page using an HTTP GET command.
True
False
all of the above
none of the mentioned
30. In order for hidden-field values to be available during page processing, you must submit the page using an HTTP POST command.
True
False
all of the above
None of the above.
31. Can you call SQL Trigger from ASP.NET application explicitly?
Yes
No
None of them
All of the mentioned
32. For separating server-side code from client-side code on a ASP.NET page, what programming model should you use?
Separation model
Code-Behind model
In-Line model
ClientServer model
33. . Which of the following operations can you NOT perform on an ADO.NET DataSet?
A DataSet can be synchronised with the database
A DataSet can be synchronised with a RecordSet.
A DataSet can be converted to XML.
You can infer the schema from a DataSet.
34. A __________ control defaults to displaying the files in the current directory?
List Box
Drive List Box
Dir List Box
File List Box
35. What debugging tools come with the .NET SDK?
CorDBG – command-line debugger
Dbg CLR – graphic debugger
Both A and B
none of the above
36. How can you get the ColumnName,DataType ColumnSize, IsKeyColumn,IsAutoIncrement of the table from the dataset?
GetSchemaTable method of the DataReader
Fill method of data adaptor
GetTableDetails method
Dataset.GetDataTable()
37. Which of the function is used to check textbox only contain number?
char.IsDigit
char.IsLetter
char.IsNumber
char.IsLetterOrDigit
38. what are the Activation modes for .NET Remoting?
Singleton
Singlecall
Both
None
39. How can you come out from the c# windows Forms Application?
Application.Exit();
Application.close();
Form.Exit();
Form.Close();
40. You have designed a logon form with two TextBox controls named txtUserName and txtpassword. You want to ensure that the user can enter only lowercase characters in the controls. Which of the following solutions will fulfill this requirement using the simplest method?
Program the KeyPress event of the TextBox controls to convert uppercase letters to lowercase letters
Create a single event handler that is attached to the KeyPress event of the form. Program this event handler to convert the uppercase letters to lowercase ones.
Set the CharacterCasing property of the Textbox controls to Lower.
Use the CharacterCasing method of the controls to convert the letters to lowercase letters
41. You are creating an order-tracking application using a Visual C# .NET Windows application. When you are unable to track a particular order number entered by the user, you need to raise an exception. Which of the following options will help you to raise an exception?
try block
catch block
finally block
throw statement
42. Which of the following events will fire when the Insert key is pressed?
KeyDown
KeyPress
KeyUp
KeyDown,KeyPress
43. . You have a TextBox control and a Help button that the user can press to get help on allowable values. You validate the data entered by the user in the TextBox control. If the user enters an invalid value, you set the focus back in the control using the Cancel property of the CancelEventArgs. A user reports that once he enters invalid data in the text box, he cannot click the Help button. What should you do to correct the problem?
Set the CausesValidation property of the text box to false.
Set the CausesValidation property of the text box to true.
Set the CausesValidation property of the Help button to false.
Set the CausesValidation property of the Help button to true.
44. You are designing a Windows Form that enables you to add a new product to the product catalog of your company. You need to validate the controls as the user enters the data. If incorrect data is entered in the field, you should set the focus back to the control and ask the user to enter the correct data. Which of the following events will you use to validate user input?
LostFocus
Validating
Leave
Validated
45. A project on which you are working calls for you to store small amount of frequently changing information about a page on the client.For this project, security is not a worry. Which is the best method to use?
A cookie
A query string
A URL
A hidden form field
46. What is the last stage of the Web forms lifecycle?
Event Handling
Page_Load
Validate
Page_Unload
47. How does ASP.NET store SessionIDs by default?
In cache
In cookies
In a global variable
In URL strings or in a database
48. Do I need IIS to develop a Web application in ASP.NET 2.0?
Yes
no
all of the above
none of the mentioned
49. What namespace does the Web page belong in the .NET Framework class hierarchy?
System.Web.Control
System.Web.RootBuilder
System.Web.UserControl
System.Web.UI.Page
50. Where would you define application and session level events?
Global.asax
Default.aspx
Web.Config
General.aspx
Submit