ASP.NET - Set 4

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

a. HTTP
b. TCP
c. SMTP
d. None of the above.
Answer  Explanation 

ANSWER: HTTP

Explanation:
No explanation is available for this question!


2)   What are the types of cookies?

a. Session cookies
b. Persistent cookies
c. Dummy cookies
d. Option A and B are correct
Answer  Explanation 

ANSWER: Option A and B are correct

Explanation:
No explanation is available for this question!


3)   What is the fully qualified name of the base class of all server controls?


a. System.Web.UI.Control
b. System.Web.UI
c. System.Control
d. All of the above
Answer  Explanation 

ANSWER: System.Web.UI.Control

Explanation:
No explanation is available for this question!


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

a. In App_Data folder
b. In Web.config file
c. In MasterPage file
d. None of the above
Answer  Explanation 

ANSWER: In Web.config file

Explanation:
No explanation is available for this question!


5)   Which of the following control provides a link for unauthenticated users to log on?

a. Login
b. LoginView
c. LoginStatus
d. LoginName
Answer  Explanation 

ANSWER: LoginStatus

Explanation:
No explanation is available for this question!


6)   What are the advantages of AJAX?

a. AJAX is a platform-independent technology
b. It provides partial-page updates
c. Improved performance
d. All of the above
Answer  Explanation 

ANSWER: All of the above

Explanation:
No explanation is available for this question!


7)   If you want to cache the page according to the browser, then what will you do?

a.
Write the given below code in aspx page.
<%@ OutputCache Duration=”500” VaryByParam=”none” VaryByCustom=”browser” %>
b.
Write the given below code in aspx page.
<%@ OutputCache Duration=”500” VaryByParam=”none” VaryByHeader=”browser” %>
c.
Write the given below code in aspx page.
<%@ OutputCache Duration=”500” VaryByParam=” browser” VaryByCustom=”none” %>
d. None of the above.
Answer  Explanation 

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

Explanation:
No explanation is available for this question!


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

a. Page_Load
b. Page_Render
c. Page_PreInit
d. Page_PreRender
Answer  Explanation 

ANSWER: Page_PreInit

Explanation:
No explanation is available for this question!


9)   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?

a. Set the EnableClientScript property to false
b. Set the validate property to false
c. Set the EnableClientScript property to true
d. Set the Page.Isvalid property to false
Answer  Explanation 

ANSWER: Set the EnableClientScript property to false

Explanation:
No explanation is available for this question!


10)   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?

a.
- 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.
b.
- 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.
c.
- 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.
d. None of the above.
Answer  Explanation 

ANSWER:
- 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.

Explanation:
No explanation is available for this question!


11)   Choose the correct option about the Integrated Security property of connection object.

a. If Integrated Security=false then User ID, and Password must be specified in the connection string.
b. If Integrated Security=true then current Windows account credentials are used for authentication.
c. Both A and B option are correct.
d. None of the above.
Answer  Explanation 

ANSWER: Both A and B option are correct.

Explanation:
No explanation is available for this question!


12)   You are creating an ASP.NET application for CareerRide. The company uses Microsoft Windows authentication. All users are in the CareerRide domain.

You want to configure the application to use the following authorization rules:

1. Anonymous users must not be allowed to access the application.
2. All employees except Raj and Shiva must be allowed to access the application.

Which code you will apply to configure the application ?


a.
<authorization>
<deny users=” CareerRide \Raj, CareerRide \Shiva”>
<allow users=”*”>
<deny users=”?”>
</authorization>

b.
<authorization>
<allow users=”*”>
<deny users=” CareerRide \Raj, CareerRide \Shiva”>
<deny users=”?”>
</authorization>

c.
<authorization>
<deny users=” CareerRide \Raj, CareerRide \Shiva”>
<deny users=”?”>
<allow users=”*”>
</authorization>

d.
<authorization>
<allow users=” CareerRide \Raj, CareerRide \Shiva”>
<allow users=”*”>
</authorization>
Answer  Explanation 

ANSWER:
<authorization>
<deny users=” CareerRide \Raj, CareerRide \Shiva”>
<deny users=”?”>
<allow users=”*”>
</authorization>

Explanation:
No explanation is available for this question!


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

a. PreLoad
b. Load
c. Preinit
d. Init
Answer  Explanation 

ANSWER: Preinit

Explanation:
No explanation is available for this question!


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

a. set CausesValidation = false
b. set RemoveValidation=true
c. set cancel=true
d. None of the above
Answer  Explanation 

ANSWER: set CausesValidation = false

Explanation:
No explanation is available for this question!


15)   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?

a. IsCallback
b. IsReusable
c. IsValid
d. IsPostBack
Answer  Explanation 

ANSWER: IsPostBack

Explanation:
No explanation is available for this question!


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

a. POST
b. SET
c. GET
d. PUT
Answer  Explanation 

ANSWER: PUT

Explanation:
No explanation is available for this question!


17)   What is/are the advantages of master page?

a. It helps to display common content in multiple pages.
b. They allow you to centralize the common functionality of your pages so that you can make updates in just one place.
c. It helps to create a common page layout.
d. All of the above.
Answer  Explanation 

ANSWER: All of the above.

Explanation:
No explanation is available for this question!


18)   How will you specifying the Cache Location?

a. You can use browser settings to specify where a page is cached.
b. You can use the Location attribute of the <%@ OutputCache %> directive to specify where a page is cached.
c. You can use the Location attribute in QueryString to specify where a page is cached.
d. None of the above.
Answer  Explanation 

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

Explanation:
No explanation is available for this question!


19)   How many types of authentication ASP.NET supports?

a. Windows Authentication.
b. .NET Passport Authentication.
c. Forms Authentication.
d. All of the above.
Answer  Explanation 

ANSWER: All of the above.

Explanation:
No explanation is available for this question!


20)   Which attribute is necessary for HTML control to work as a HTML server control?

a. runat=”server”
b. runat=”web-server”
c. ID=”server”
d. ID=”web-server”
Answer  Explanation 

ANSWER: runat=”server”

Explanation:
No explanation is available for this question!


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

a. Set MultipleActiveResultSets=True"
b. Set MultipleResultSets=true"
c. Set ResultSets=True"
d. None of the above.
Answer  Explanation 

ANSWER: Set MultipleActiveResultSets=True"

Explanation:
No explanation is available for this question!


22)   Which control can be used to update only the portion of the page?

a. UpdatePanel
b. ScriptManager
c. AsyncPostBackTrigger
d. None of the above.
Answer  Explanation 

ANSWER: UpdatePanel

Explanation:
No explanation is available for this question!


23)   Which is the mandatory property for all validation controls?

a. ControlToValidate
b. Message
c. EnableClientScript
d. EnableServerScript
Answer  Explanation 

ANSWER: ControlToValidate

Explanation:
No explanation is available for this question!


24)   Which object works on client side in state management system?

a. ViewState
b. cookies
c. Query strings
d. All of the above
Answer  Explanation 

ANSWER: All of the above

Explanation:
No explanation is available for this question!


25)   How many types of caching ASP.NET supports?

a. Page Output Caching
b. Partial Page Caching
c. Data Caching
d. DataSource Caching
e. All of the above.
Answer  Explanation 

ANSWER: All of the above.

Explanation:
No explanation is available for this question!