ASP.Net/ASP.Net Mcq Question Set 2 Sample Test,Sample questions

Question:
  If you want to cache the page according to the browser, then what will you do?

1.Write the given below code in aspx page. <%@ OutputCache Duration=”500” VaryByParam=”none” VaryByCustom=”browser” %>

2.Write the given below code in aspx page. <%@ OutputCache Duration=”500” VaryByParam=”none” VaryByHeader=”browser” %>

3.Write the given below code in aspx page. <%@ OutputCache Duration=”500” VaryByParam=” browser” VaryByCustom=”none” %>

4.None of the above.

Posted Date:-2022-02-01 11:21:52


Question:
  What is the fully qualified name of the base class of all server controls?

1. System.Web.UI.Control

2.System.Web.UI

3.System.Control

4.All of the above

Posted Date:-2022-02-01 11:19:55


Question:
  Which one of the following HTTP verbs indicates that you are creating and writing a file on the Web server?

1.POST

2.SET

3.GET

4.PUT

Posted Date:-2022-02-01 11:26:29


Question:
 Choose the correct option according to given statements.

Statement 1: Authentication is the process that determines the identity of a user.
Statement 2: Authorization is the process of determining whether a user is permitted to access to any part of an application, or any particular resource.
Statement 3: Authorization is the process that determines the identity of a user.
Statement 4: Authentication is the process of determining whether a user is permitted access to any part of an application, or any particular resource.

1.Statement 1 and Statement 2 are correct.

2.Statement 3 and Statement 4 are correct.

3.Statement 1 and Statement 3 are correct.

4.Statement 2 and Statement 4 are correct.

Posted Date:-2022-02-01 11:36:22


Question:
 How many types of caching ASP.NET supports?

1.Page Output Caching

2. Partial Page Caching

3.Data Caching

4.All of the above.

Posted Date:-2022-02-01 11:29:24


Question:
 Match the following List 1 to List 2

a. Client-side navigation ---------------------- i. Server.Transfer
b. Cross-page posting ------------------------- ii. Response.Redirect
c. Client-side browser redirects ------------- iii. PostBackUrl
d. Server-side transfer ------------------------- iv. HyperLink

1. a-iv, b-iii, c-ii, d-i

2.a-ii, b-iv, c-i, d-iii

3.a-ii, b-i, c-iii, d-iv

4.a-ii, b-iv, c-iii, d-i

Posted Date:-2022-02-01 11:35:06


Question:
 Match the following List 1 to List 2

a. Web Form -------------------------- i. .ascx
b. Web User Control ---------------- ii. .asmx
c. Web Service ---------------------- iii. .aspx

1.a-iii, b-i, c-ii

2.a-ii , b-i, c-iii

3.a-i, b-ii, c-iii

4.None of the mentioned

Posted Date:-2022-02-01 11:38:20


Question:
 What are the advantages of AJAX?

1.AJAX is a platform-independent technology

2. It provides partial-page updates

3.Improved performance

4.All of the above

Posted Date:-2022-02-01 11:21:12


Question:
 What are the different types of Session Mode in ASP.NET?

1.InProc

2.StateServer

3.SQLServer

4.All of the above

Posted Date:-2022-02-01 11:33:55


Question:
 Which file you should write for the connection string, so that you can access it in all the web pages for the same application?

1. In App_Data folder

2. In Web.config file

3.In MasterPage file

4.none of the above

Posted Date:-2022-02-01 11:20:21


Question:
 Which of the following control provides a link for unauthenticated users to log on?

1. Login

2.LoginView

3. LoginStatus

4.LoginName

Posted Date:-2022-02-01 11:20:44


Question:
 Which Session Mode stores session Information in Current Application Domain?

1.InProc

2.StateServer

3. SQLServer

4.Off

Posted Date:-2022-02-01 11:40:31


Question:
 You want to enable Page Output Caching in ASP.NET. What code you will write in ASPX page.

1.<%@ OutputCache Duration="30" VaryByParam="none" %>

2.<%@ OutputCache VaryByParam="none" %>

3.<%@ OutputCache Duration="30" %>

4.None of the above.

Posted Date:-2022-02-01 11:35:45


Question:
A button control is located outside the UpdatePanel control. You need that a given button control outside of the UpdatePanel should cause the UpdatePanel to execute an update with partial update. What will you do to achieve this task?

1.Add a PostBackTrigger control to the Triggers section of the UpdatePanel. - Set the ControlID attribute of the AsyncPostBackTrigger control to the ID of the Button control.

2.Add a Trigger control to the Triggers section of the UpdatePanel. - Set the ControlID attribute of the AsyncPostBackTrigger control to the ID of the Button control.

3.Add an AsyncPostBackTrigger control to the Triggers section of the UpdatePanel. - Set the ControlID attribute of the AsyncPostBackTrigger control to the ID of the Button control.

4.None of the above.

Posted Date:-2022-02-01 11:23:39


Question:
At which level Theme can be applied?

1.Page level

2.Site level (through the Web.config file)

3. Individual control level

4.All of the above.

Posted Date:-2022-02-01 11:32:30


Question:
By default, when you use Page Output Caching, at what location page is cached?

1.Only on web server

2. Only on Client

3.Web server, any proxy servers, and browser

4.All of the above.

Posted Date:-2022-02-01 11:40:53


Question:
Client-side validation is turned on by default. If you want that particular validation control should not validate at client side, what will you do?

1.Set the EnableClientScript property to false

2. Set the validate property to false

3.Set the EnableClientScript property to true

4. Set the Page.Isvalid property to false

Posted Date:-2022-02-01 11:22:42


Question:
CompareValidator control can be used for performing which task?

1.To perform a data type check.

2.To compare the value entered into a form field against a fixed value.

3.To compare the value of one form field against another.

4.All of the above.

Posted Date:-2022-02-01 11:34:40


Question:
Debug class is available in which namespace?

1.System.Debug

2.System.Data

3.System.Diagnostics

4. None of the above

Posted Date:-2022-02-01 11:41:27


Question:
How many 'ScriptManager' control can be added on a ASP.NET web page?

1. Only One

2. More than One

3. Only Two

4.None of the above.

Posted Date:-2022-02-01 11:37:36


Question:
How will you add a TextBox control at runtime on the form? Choose the correct one.

1.extBox obj = new TextBox(); obj.ID = "txtUserName"; form1.Controls.Add(obj);

2. form1.Controls.Add(TextBox);

3. this.FindControl.add(TextBox);

4.None of the above.

Posted Date:-2022-02-01 11:30:25


Question:
HTTP messages are typically sent between the Web server and Web browser using which Port number?

1.70

2.80

3.400

4.410

Posted Date:-2022-02-01 11:33:12


Question:
If a user wants to create controls at runtime which event should be used to write code?

1.PreLoad

2. Load

3.Init

4.PreInit

Posted Date:-2022-02-01 11:29:54


Question:
MARS feature is disabled by default. What action you will perform in connection string to enable this feature?

1.Set MultipleActiveResultSets=True"

2. Set MultipleResultSets=true"

3. Set ResultSets=True"

4.None of the above.

Posted Date:-2022-02-01 11:27:48


Question:
Match the following List 1 to List 2

a. Literal Control ----------------- i. SingleLine, MultiLine, Password
b. Label Control ------------------ ii. CommandName
c. TextBox Control -------------- iii. Convert to span tag in HTML
d. Button Control ---------------- iv. PassThrough, Encode, Transform mode

1. a-iv, b-iii, c-ii, d-i

2. a-ii, b-iv, c-i, d-iii

3.a-ii, b-i, c-iii, d-iv

4.a-iv, b-iii, c-i, d-ii

Posted Date:-2022-02-01 11:41:53


Question:
On what object would you set the properties to create a primary key for a DataTable?

1.DataRelation

2.DataColumn

3.DataSet

4. DataTable

Posted Date:-2022-02-01 11:37:14


Question:
To create your application on a remote server which option you will choose in ASP.NET?

1.File System

2.FTP

3.HTTPS

4.None of the above.

Posted Date:-2022-02-01 11:38:43


Question:
Using which type of stylesheet we can change the style of an element in the entire website?

1.Internal Stylesheet

2.External Stylesheet

3.Inline stylesheet

4.None of above

Posted Date:-2022-02-01 11:17:31


Question:
What are the client-side state management options that ASP.NET supports?

1.Application

2.Session

3.Querystring

4.Option A and B are correct.

Posted Date:-2022-02-01 11:40:09


Question:
What are the three main objects of DataSet?

1.DataTable, DataColumn, and type.

2.DataTable, DataRelation, and DataAdapter.

3. DataTable, DataColumn, and DataRelation.

4.DataReader,DataAdapter, and Command.

Posted Date:-2022-02-01 11:36:54


Question:
What is Multiple Active Result Sets (MARS)?

1.It allows execution of multiple batches against Database on a single connection.

2.New feature of SQL SERVER 2005. Previous version of SQL Server does not support this feature.

3.Option A and B are correct.

4.None of the above.

Posted Date:-2022-02-01 11:39:17


Question:
What is the use of VaryByParam attribute in OutputCache directive?

1.You can neglect VaryByParam attribute while using Page output caching.

2.The VaryByParam attribute determines which versions of the page output are actually cached.

3.The VaryByParam attribute determines which web page is cached in database.

4.None of the above.

Posted Date:-2022-02-01 11:31:29


Question:
What type of data can Cookies store?

1. String

2.DateTime

3.System.Int32

4.None of the above.

Posted Date:-2022-02-01 11:33:33


Question:
When user request a web page by entering Uniform Resource Locator (URL) then which method /verb/command is used in ASP.NET?

1. POST

2.SET

3.GET

4.All of the above.

Posted Date:-2022-02-01 11:32:51


Question:
Which attribute is necessary for HTML control to work as a HTML server control?

1. runat=”server”

2. runat=”web-server”

3. ID=”server”

4.ID=”web-server”

Posted Date:-2022-02-01 11:27:25


Question:
Which control can be used to update only the portion of the page?

1.UpdatePanel

2.ScriptManager

3.AsyncPostBackTrigger

4.None of the above.

Posted Date:-2022-02-01 11:28:10


Question:
Which control is required inside a content page to reference ContentPlaceHolder control inside the master page?

1.Content control on a content page.

2.ContentPlaceHolder on a content page.

3. PlaceHolder control is required on content page.

4.None of the above.

Posted Date:-2022-02-01 11:32:05


Question:
Which Data Provider gives the maximum performance when connect to SQL Server?

1. The SqlClient data provider.

2.The OLE DB data provider.

3. The Oracle data provider

4. All of the above.

Posted Date:-2022-02-01 11:39:40


Question:
Which is the first event of ASP.NET page, when user requests a web page ?

1.PreLoad

2.Load

3.Preinit

4.Init

Posted Date:-2022-02-01 11:25:48


Question:
Which is the mandatory property for all validation controls?

1. ControlToValidate

2.Message

3.EnableClientScript

4.EnableServerScript

Posted Date:-2022-02-01 11:28:37


Question:
Which object works on client side in state management system?

1. ViewState

2.cookies

3. Query strings

4. All of the above

Posted Date:-2022-02-01 11:29:02


Question:
Which of the following is the way to monitor the web application?

1.MMC Event viewers

2.Performance logs

3.Alerts Snap-ins

4.ALL

Posted Date:-2022-02-01 11:17:56


Question:
Which property and method of the Page object do you use to register client script dynamically from code?

1.ScriptManager control is used to dynamically register client script from code.

2.The Page.ClientScript.RegisterClientScriptBlock is used to dynamically register client script from code.

3.ScriptManagerProxy control is used to dynamically register client script from code.

4. None of the above.

Posted Date:-2022-02-01 11:37:59


Question:
Which protocol is used for requesting a web page in ASP.NET from the Web Server?

1.HTTP

2.TCP

3.SMTP

4.None of the above.

Posted Date:-2022-02-01 11:19:16


Question:
Which type of processing model does asp.net stimulate?

1.Static

2.Linear

3.Bottom­ up

4. Event­-driven

Posted Date:-2022-02-01 11:18:45


Question:
Which validation control in ASP.NET can be used to determine if the data is entered into a TextBox control is of type Currency?

1.ValidationSummary

2.CompareValidator

3.RequiredFieldValidator

4.None of the above.

Posted Date:-2022-02-01 11:34:17


Question:
You are creating an ASP.NET application for company CareerRide. You use form based authentication to validate users. You need to prevent unauthenticated users from accessing the application. What should you do?

1. In the authorization section of the Web.config file, set the users attribute of the deny element to “?”

2. Set In the authorization section of the Web.config file, set the users attribute of the deny element to “*”

3. In the authorization section of the Machine.config file, set the users attribute to the allow element to “?”.

4.None of the above.

Posted Date:-2022-02-01 11:30:54


Question:
You need to allow users to choose their own themes. In which page event will you write the user-selected theme?

1. Page_Load

2. Page_Render

3.Page_PreInit

4.Page_PreRender

Posted Date:-2022-02-01 11:22:17


Question:
_____is a property common in every validation control.

1. ValidationExpression

2.InitialValue

3.ValueToCompare

4.ControlToValidate

Posted Date:-2022-02-01 11:17:07


Question:
______ file apply settings to all ASP.NET applications

1.web.config

2.machine.config

3.global.asax file

4. application object

Posted Date:-2022-02-01 11:18:23


More MCQS

  1. ASP.Net Mcq Question Set 1
  2. ASP.Net Mcq Question Set 2
  3. ASP.Net Mcq Question Set 3
  4. ASP.Net Mcq Question Set 4
  5. ASP.Net Mcq Question Set 5
  6. ASP.Net Mcq Question Set 6
  7. ASP.Net Mcq Question Set 7
  8. ASP.Net Mcq Question Set 8
  9. ASP.Net Mcq Question Set 9
  10. ASP.Net Mcq Question Set 10
  11. ASP.Net Mcq Question Set 11
  12. ASP.Net Mcq Question Set 12
  13. ASP.Net Mcq Question Set 13
  14. ASP.Net Mcq Question Set 14
  15. Silverlight mcq questios and answer
  16. Microsoft Silverlight MCQ Questions & Answers
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!