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

Question:
  In which file you should write the connection string, so you can access it in all the web page for same application?

1.In App_Data folder.

2.In Web.config file.

3. In MasterPage file.

4.None of the above.


Question:
 Default Session data is stored in ASP.Net.

1.StateServer

2.Session Object

3.InProcess

4.All of the above


Question:
 From the following which is not a valid state management object?

1.Querystate

2.Cookies

3.Application state

4.Hidden form fields


Question:
 If any user has disabled cookies in their browsers, what can you do to enable them to use forms authentication?

1.Set BoweserCookieEnabled=true;

2.Set cookieless=true;

3.Use the AutoDetect setting of the cookieless attribute.

4.None of the above.


Question:
 If we want to add graphics using asp.net which of the following web control will you use?

1.Link Button

2.AdRotator

3.Grid View

4. Layout


Question:
 In order to prevent a browser from caching a page which of these xstatements should be written?

1.Response.Cache.SetNoStore();

2.Response.Cache.SetNoServerCaching();

3.Response.Cache.SetNoCaching();

4.None of these


Question:
 To kill a users session explicitly which of the following will you use?

1.Session.Close()

2.Session.End()

3. Session.Abondon()

4. Session.Discard()


Question:
 To perform asynchronous data access, what must be added to the connection string?

1.BeginExecute=true

2. MultiThreaded=true

3.MultipleActiveResultSets=true

4.Asynchronous=true


Question:
 Validation events of server controls occur before the page is post back to the server.

1.True

2.False

3.all of the above

4.None of the mentioned


Question:
 What is a web application running on multiple servers called?

1. HTTP

2.Web Servers

3.Web Page

4. Web farm


Question:
 What 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.


Question:
 Where do we include the user lists for Form authentication?

1.< credential>

2.< authorization>

3.< Identity>

4.< authentication>


Question:
 Which of the following is a valid skin code inside a skin file?

1.< asp:TextBox BackColor=”Yellow” BorderStyle=”Dotted” ID=”colorTxt” Runat=”Server”/>

2.< asp:TextBox BackColor=”Yellow” BorderStyle=”Dotted” Runat=”Server” />

3. < asp:TextBox BackColor=”Yellow” BorderStyle=”Dotted” ID=”colorTxt” />

4.None of the above.


Question:
 Which of the following is not a member of ADODBCommand object?

1.ExecuteScalar

2.ExecuteStream

3.Open

4. ExecuteReader


Question:
 Which of these data source controls do not implement Caching?

1. LinqDataSource

2. ObjectDataSource

3.SqlDataSource

4.XmlDataSource


Question:
 Which one of the following has a parameter called as “preserveForm”?

1.Server.transfer

2.Response.redirect

3.all of the above

4.none of the above


Question:
A Master Page contains a ScriptManager control and a user wants the AJAX functionality on content page then which control is necessary on content page.

1. AsyncPostBackTrigger

2.ScriptManager

3.ScriptManagerProxy

4.None of the above.


Question:
A web page has lots of input data, and you want the data input to be spread across multiple screens. What is the best control to use to implement this solution on a single Web page?

1.ImageMap

2.Panel

3.Wizard

4.none of the above


Question:
ASP.NET validation controls works (handle validation) at

1.Client side only.

2. Server side only.

3.Both client side and server side.

4.None of the above.


Question:
By default, a .Net web site is configured with which of the following authentication types?

1. Anonymous

2.Basic

3.Integrated Windows authentication

4.a and c


Question:
Choose the correct option about the Integrated Security property of connection object.

1.If Integrated Security=false then User ID, and Password must be specified in the connection string.

2. If Integrated Security=true then current Windows account credentials are used for authentication.

3. Both A and B option are correct.

4.None of the above.


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

1.Windows Authentication.

2..NET Passport Authentication.

3. Forms Authentication.

4.All of the above.


Question:
How many types of Cache Dependencies are available in ASP.NET?

1.File based dependencies

2.Key-based dependencies

3.Time-based dependencies

4.All of the above


Question:
How to implement authentication via web.config?

1.Include the authentication element.

2. Include the authorization element.

3. Include the identity element.

4.Include the deny element.


Question:
How will you specifying the Cache Location?

1.You can use browser settings to specify where a page is cached.

2.You can use the Location attribute of the < %@ OutputCache %> directive to specify where a page is cached.

3.You can use the Location attribute in QueryString to specify where a page is cached.

4.None of the above.


Question:
In ASP.NET what are the different types of session mode available?

1.InProc

2.StateServer

3.SQLServer

4.All of the above


Question:
There is a button on page name cancel and it should bypass validation when cancel button is clicked. What will you do?

1. set CausesValidation = false.

2. set RemoveValidation=true

3.set cancel=true

4.None of the above.


Question:
What are the Command Object Methods?

1.ExecuteNonQuery

2.ExecuteReader

3.ExecuteScalar

4.All of the above.


Question:
What are the types of cookies?

1.Session cookies

2.Persistent cookies.

3.Dummy cookies.

4.Option A and B are correct.


Question:
What ASP.NET object encapsulates the state of the client and the browser?

1.Application Object

2.Session Object

3.Response Object

4.Request Object


Question:
What data type is returned when calling the ExecuteScalar method of a command object?

1.System.Int32

2. Object

3. No of effected records.

4.None of the above.


Question:
What happens in the Init event of a page?

1.ViewState is loaded on the page.

2. Each child control of the page is initialized to its design time values.

3.HTML is rendered.

4.None of the above.


Question:
What is the name of the Page object’s property that determines if a Web page is being requested without data being submitted to server?

1.IsCallback

2.IsReusable

3. IsValid

4.IsPostBack


Question:
What is/are the advantages of master page?

1.It helps to display common content in multiple pages.

2.They allow you to centralize the common functionality of your pages so that you can make updates in just one place.

3.It helps to create a common page layout.

4.All of the above.


Question:
What is/are true about master page? Choose the correct option.

1.You can add more than one master page in a website.

2.Master page can be nested.

3.ContentPlaceHolder control is required on a content page.

4.Both A and B option are correct.


Question:
What property do you modify on a server control to minimize the size of the ViewState data?

1.ViewState=”true”

2.Set EnableViewState to false.

3. Set EnableViewState to true.

4.None of the above


Question:
When does Garbage collector run?

1.When application is running low of memory

2. It runs random

3. When application is running for more than 15 minutes

4.none of the above


Question:
Which ado.net class provide disconnected environment?

1.DataReader

2.DataSet

3.Command

4.None of the above.


Question:
Which control is required of every AJAX page to manage the JavaScript files sent to the client and the communication between client and server?

1.UpdatePanel

2.ScriptManager

3.AsyncPostBackTrigger

4.None of the above.


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

1.PreLoad

2. Load

3.Preinit

4.Init


Question:
Which of the following is the default authentication mode for IIS?

1.Anonymous

2.Windows

3.Basic Authentication

4.None of the mentioned


Question:
Which of the following statements about referencing master page methods and properties is true?

1.Content pages can reference controls in the master page.

2.Content pages can reference public properties in the master page.

3.Content pages can reference public methods in the master page

4.All of the above.


Question:
Which session modes stores session Information in Current Application Domain?

1. InProc

2.StateServer

3. SQLServer

4.Off


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

1.ValidationSummary

2. CompareValidator

3.RequiredFieldValidator

4.None of the above.


Question:
Windows-Based Authentication is well suited for.

1. Intranet environment.

2.Public web site.

3.Desktop application.

4.None of the above.


Question:
You need to programmatically configure page output caching. Which object would you use?

1.Request

2.Response

3.Application

4.server address


Question:
You use the ASP.NET Web Site Administration Tool to configure ASP.NET membership with forms authentication. What should you name your login form so that you do not have to modify the Web.config file?

1.Login.aspx

2.LoginPage.aspx

3.Default.aspx

4.Auth.aspx


Question:
You want to make a configuration setting change that will affect only the current Web application. Which file will you change?

1.Global.asax

2.Web.config in the root of the Web application

3.Machine.config

4.All of the above


Question:
____is the first method that is fired during the page load.

1. PreRender()

2.Load()

3. Unload()

4.Init()


Question:
______ is the DataType return in IsPostback property.

1.bit

2.boolean

3. int

4.Object


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
Olete Team
Online Exam TestTop Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on Online Exam Testwebsite 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!