ASP NET Questions - Set 4

1)   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!


2)   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!


3)   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!


4)   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!


5)   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 I
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
c. - Add an AsyncPostBackTrigger control to the Triggers section of the UpdatePanel. - Set the ControlID attribute of the AsyncPostBackTrigger control to
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

Explanation:
No explanation is available for this question!


6)   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!


7)   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!


8)   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!


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


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


11)   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!


12)   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!


13)   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!


14)   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!


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


16)   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!


17)   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!


18)   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!


19)   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!


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

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

ANSWER: PreInit

Explanation:
No explanation is available for this question!