1) You want to make a configuration setting change that will affect only the current Web application. Which file will you change?
a. Global.asax
b. Web.config in the root of the Web application
c. Machine.config
d. All of the above
Answer
Explanation
|
ANSWER: Web.config in the root of the Web application
Explanation: No explanation is available for this question!
|
|
2) ______________is the first method that is fired during the page load.
a. PreRender()
b. Load()
c. Unload()
d. Init()
Answer
Explanation
|
ANSWER: Init()
Explanation: No explanation is available for this question!
|
|
3) What is a web application running on multiple servers called?
a. HTTP
b. Web Servers
c. Web Page
d. Web farm
Answer
Explanation
|
ANSWER: Web farm
Explanation: When we host a web application over multiple web servers to distribute the load among them it is known as a web farm
|
|
4) What property do you modify on a server control to minimize the size of the ViewState data?
a. ViewState=”true”
b. Set EnableViewState to false.
c. Set EnableViewState to true.
d. None of the above
Answer
Explanation
|
ANSWER: Set EnableViewState to false.
Explanation: In ASP.NET when a form is postback to server it reappears in the browser with all form values. ASP.NET page and controls maintain their state by in hidden form field named _ViewState. By default it is enable for all server controls and sometimes create problem because unnecessary data are stored in this field. To minimize the size of the ViewState data, set EnableViewState to false.
|
|
5) 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?
a. ImageMap
b. Panel
c. Wizard
d. None of the above
Answer
Explanation
|
ANSWER: Wizard
Explanation: The Wizard control is used to divide a large form, which has the lots of data, into multiple sub-forms. The Wizard control contains one or more WizardStep child controls. Only one WizardStep is displayed at a time.
|
|
6) ASP.NET validation controls works (handle validation) at
a. Client side only.
b. Server side only.
c. Both client side and server side.
d. None of the above.
Answer
Explanation
|
ANSWER: Both client side and server side.
Explanation: ASP.NET validation controls can be attached to user input controls to handle validation on both the server and the client. Client-side validation improves performance by checking the input data at the browser before sending to the server. Clint side validation is not so much secure. It can be easily hacked by hackers. Server-side validation is more secure way of validating the data that is posted back to the server.
|
|
7) 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!
|
|
8) Which of the following is a valid skin code inside a skin file?
a. < asp:TextBox BackColor=”Yellow” BorderStyle=”Dotted” ID=”colorTxt” Runat=”Server”/>
b. < asp:TextBox BackColor=”Yellow” BorderStyle=”Dotted” Runat=”Server” />
c. < asp:TextBox BackColor=”Yellow” BorderStyle=”Dotted” ID=”colorTxt” />
d. None of the above.
Answer
Explanation
|
ANSWER: < asp:TextBox BackColor=”Yellow” BorderStyle=”Dotted” Runat=”Server” />
Explanation: You must always include a Runat=”server” attribute, but you can never include the ID attribute when declaring a control in a Skin.
|
|
9) 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!
|
|
10) How to implement authentication via web.config?
a. Include the authentication element.
b. Include the authorization element.
c. Include the identity element.
d. Include the deny element.
Answer
Explanation
|
ANSWER: Include the authorization element.
Explanation: No explanation is available for this question!
|
|
11) Windows-Based Authentication is well suited for.
a. Intranet environment.
b. Public web site.
c. Desktop application.
d. None of the above.
Answer
Explanation
|
ANSWER: Intranet environment.
Explanation: In a Windows-based authentication, the requests go directly to IIS to provide the authentication process. This type of authentication is quite useful in an intranet environment, where the server handles authentication process.
|
|
12) If any user has disabled cookies in their browsers, what can you do to enable them to use forms authentication?
a. Set BoweserCookieEnabled=true;
b. Set cookieless=true;
c. Use the AutoDetect setting of the cookieless attribute.
d. None of the above.
Answer
Explanation
|
ANSWER: Use the AutoDetect setting of the cookieless attribute.
Explanation: No explanation is available for this question!
|
|
13) What ASP.NET object encapsulates the state of the client and the browser?
a. Application Object
b. Session Object
c. Response Object
d. Request Object
Answer
Explanation
|
ANSWER: Session Object
Explanation: No explanation is available for this question!
|
|
14) In ASP.NET what are the different types of session mode available?
a. InProc
b. StateServer
c. SQLServer
d. All of the above
Answer
Explanation
|
ANSWER: All of the above
Explanation: InPorc Session Mode:
This is the default session mode in Asp.Net. Its stores session Information in Current Application Domain. There are no requirements of serialization to store data in InProc Session Mode.
StateServer Session Mode:
This is also called Out-Proc session mode. It is managed by aspnet_state.exe. In this mode server may runs on the same system, but it's outside of that main application domain where your web site is running. It is useful in web farm and web garden scenarios.
SQL Server Session Mode:
In this session mode, the Session data is serialized and stored in the SQL Server database. We should use SQL server session mode when we need to implement Session with some more security.
|
|
15) To kill a users session explicitly which of the following will you use?
a. Session.Close()
b. Session.End()
c. Session.Abondon()
d. Session.Discard()
Answer
Explanation
|
ANSWER: Session.Abondon()
Explanation: The Abandon method destroys all the objects stored in a session object and releases their resources. If we don't call this explicitly the server destroys this object when the session times out.
|
|
16) Which control is required of every AJAX page to manage the JavaScript files sent to the client and the communication between client and server?
a. UpdatePanel
b. ScriptManager
c. AsyncPostBackTrigger
d. None of the above.
Answer
Explanation
|
ANSWER: ScriptManager
Explanation: ScriptManager control is mandatory control if you want to work with ASP.NET AJAX server control. Only one instance of a ScriptManager can be added to the web page. It manages the JavaScript files sent to the client and the communication between the server and the client. It also manages partial-page updates. The HTML for a ScriptManager control in Source view looks as follows:
< asp:UpdatePanel ID="UpdatePanel1" runat="server"> asp:UpdatePanel>
|
|
17) What property and method of the Page object do you use to register client script dynamically from code?
a. ScriptManager control is used to dynamically register client script from code.
b. The Page.ClientScript.RegisterClientScriptBlock is used to dynamically register client script from code.
c. ScriptManagerProxy control is used to dynamically register client script from code.
d. None of the above.
Answer
Explanation
|
ANSWER: ScriptManagerProxy control is used to dynamically register client script from code.
Explanation: No explanation is available for this question!
|
|
18) Which ado.net class provide disconnected environment?
a. DataReader
b. DataSet
c. Command
d. None of the above.
Answer
Explanation
|
ANSWER: DataSet
Explanation: No explanation is available for this question!
|
|
19) What data type is returned when calling the ExecuteScalar method of a command object?
a. System.Int32
b. Object
c. No of effected records.
d. None of the above.
Answer
Explanation
|
ANSWER: Object
Explanation: No explanation is available for this question!
|
|
20) How many types of Cache Dependencies are available in ASP.NET?
a. File based dependencies
b. Key-based dependencies
c. Time-based dependencies
d. All of the above
Answer
Explanation
|
ANSWER: All of the above
Explanation: No explanation is available for this question!
|
|