ASP.NET - Set 7

1)   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 implement this solution on a single Web page?

a. ImageMap
b. Panel
c. Wizard
d. None of the above.
Answer  Explanation 

ANSWER: Wizard

Explanation:
No explanation is available for this question!


2)   Match the following List 1 (Controls) to List 2.

a. Image ------------------------- i. Navigate, PostBack, Inactive HotSpotMode
b. ImageButton ---------------- ii. Container control
c. ImageMap ------------------- iii. Has command event
d. MultiView ------------------- iv. Does not have click event


a. a-iv, b-iii, c-i, d-ii
b. a-ii, b-iv, c-i, d-iii
c. a-ii, b-i, c-iii, d-iv
d. a-iv, b-iii, c-i, d-ii
Answer  Explanation 

ANSWER: a-iv, b-iii, c-i, d-ii

Explanation:
No explanation is available for this question!


3)   What are the steps to create a DataTable programmatically?

a. Instantiate a new DataTable and add DataColumn objects to the DataTable. Columns Collection.
b. Run the Data Source Configuration Wizard.
c. Instantiate a new DataSet object.
d. None of the above.
Answer  Explanation 

ANSWER: Instantiate a new DataTable and add DataColumn objects to the DataTable. Columns Collection.

Explanation:
No explanation is available for this question!


4)   The three statements are given below about DataSet and DataReader, choose the correct option according to the statement.

Statement 1: DataSet Provides Disconnected environment but DataReader provides Connected environment.
Statement 2: DataSet Provides Connected environment but DataReader provides Disconnected environment.
Statement 3: DataSet Can store multiple table simultaneously but DataReader Supports a single table based on a single SQL query.


a. Only Statement 1 is correct.
b. Statement 1 and 2 is correct.
c. Statement 2 and 3 is correct.
d. Statement 1 and 3 is correct.
Answer  Explanation 

ANSWER: Statement 1 and 3 is correct.

Explanation:
No explanation is available for this question!


5)   The following group profile properties defined under a group name in Web.config file. How will you access Street and City property?

<properties>
<group name="Address">
<add name="Street" />
<add name="City" />
</group>
</properties>


a. - Profile.name.Street
 - Profile.name.City
b. - Profile.Address.Street
 - Profile.Address.City
c. - Address.Street
 - Address.City
d. None of the above.
Answer  Explanation 

ANSWER: - Profile.Address.Street
 - Profile.Address.City

Explanation:
No explanation is available for this question!


6)   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:
No explanation is available for this question!


7)   The UpdatePanel supports two types of triggers: AsyncPostBackTrigger and PostBackTrigger. Choose the correct option regarding working of these triggers.

a. AsyncPostBackTrigger causes an asynchronous (Ajax) postback.
b. PostBackTrigger causes a normal entire-page postback.
c. AsyncPostBackTrigger causes a normal entire-page postback.
d. Option A and B are Correct.
Answer  Explanation 

ANSWER: Option A and B are Correct.

Explanation:
No explanation is available for this question!


8)   What is/are true about master page? Choose the correct option.

a. You can add more than one master page in a website.
b. Master page can be nested.
c. ContentPlaceHolder control is required on a content page.
d. Both A and B options are correct.
Answer  Explanation 

ANSWER: Both A and B options are correct.

Explanation:
No explanation is available for this question!


9)   What is/are true about master page?

a. Master page contains a <%@ Master %> directive instead of the normal <%@ Page %> directive.
b. ContentPlaceHolder control can be added only on master page.
c. You can add as many ContentPlaceHolders to a Master Page as you need.
d. All of the above.
Answer  Explanation 

ANSWER: All of the above.

Explanation:
No explanation is available for this question!


10)   To implement a specified .NET Framework interface which directive is used?

a. @Register
b. @Control
c. @Reference
d. @Implements
Answer  Explanation 

ANSWER: @Implements

Explanation:
No explanation is available for this question!


11)   Which of the following is not an ASP.NET page event?

a. Init
b. Load
c. Import
d. None of the above.
Answer  Explanation 

ANSWER: Import

Explanation:
No explanation is available for this question!


12)   How will you store and retrieve value in viewstate?

a. // Storing the data in viewstate
 ViewState[“SiteName”]=”CareerRide”;
 // Retrieving Value from a View State
 Label1.Text = ViewState["SiteName "].ToString();
b. // Storing the data in viewstate
 ViewState obj=new ViewState
 ViewState [obj]=”CareerRide”;
 // Retrieving Value from a View State
 Label1.Text = ViewState[obj].ToString();
c. // Storing the data in viewstate
 ViewState=”CareerRide”;
 // Retrieving Value from a View State
 Label1.Text = ViewState.ToString();
d. None of the above.
Answer  Explanation 

ANSWER: // Storing the data in viewstate
 ViewState[“SiteName”]=”CareerRide”;
 // Retrieving Value from a View State
 Label1.Text = ViewState["SiteName "].ToString();

Explanation:
No explanation is available for this question!


13)   Which file is used to write the code to respond to the Application_Start event?

a. Any ASP.NET web page with an .aspx extension
b. Web.config
c. Global.asax
d. None of the above.
Answer  Explanation 

ANSWER: Global.asax

Explanation:
No explanation is available for this question!


14)    What is the difference between a Local Transaction and a Distributed Transaction?

a. Local transactions are performed on a single database table, but distributed transactions are performed on more than one database tables.
b. Local transactions are performed on a single database server, but distributed transactions can be performed across multiple database servers.
c. Local transactions are performed on a database on the local machine, but distributed transactions are performed on a database on a remote machine.
d. None of the above.
Answer  Explanation 

ANSWER: Local transactions are performed on a single database server, but distributed transactions can be performed across multiple database servers.

Explanation:
No explanation is available for this question!


15)   Choose the correct option about DataReader object.

a. DataReader object is a forward-only object.
b. It provides connection oriented environment.
c. DataReader is read only object.
d. All of the above
Answer  Explanation 

ANSWER: All of the above

Explanation:
No explanation is available for this question!


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

a. Internal Stylesheet
b. External Stylesheet
c. Inline stylesheet
d. None of these above
Answer  Explanation 

ANSWER: External Stylesheet

Explanation:
No explanation is available for this question!


17)   How do you create a TextBox for retrieving a password from a user?

a. Set TextMode property of the TextBox control to Secret.
b. Set Mode property of the TextBox control to Password.
c. Set Text property of the TextBox control to Password.
d. Set TextMode property of the TextBox control to Password.
Answer  Explanation 

ANSWER: Set TextMode property of the TextBox control to Password.

Explanation:
No explanation is available for this question!


18)   What is/are the advantages of StateServer session mode?

a. Its keeps the data separate from IIS so; if any Issue comes with IIS it will not hamper Session data.
b. It is useful in web farm and web garden scenarios.
c. Process is fast due to serialization and de-serialization.
d. A and B are the correct option.
Answer  Explanation 

ANSWER: A and B are the correct option.

Explanation:
No explanation is available for this question!


19)   What is/are the advantages of Session State?

a. It helps to maintain user data to all over the application and can store any kind of object.
b. Stores every client data separately.
c. Session is secure and transparent from user.
d. All of the above
Answer  Explanation 

ANSWER: All of the above

Explanation:
No explanation is available for this question!


20)   Choose the correct option about DataSet object.

a. Provides Disconnected mode
b. Can store multiple table simultaneously
c. Consumer Object
d. All of the above.
Answer  Explanation 

ANSWER: All of the above.

Explanation:
No explanation is available for this question!


21)   You are a Web developer for CareerRide. The data is stored in a Microsoft SQL Server 2005 database on a server named CareerPC and the Database name is TestDB. You connect to TestDB by using Windows Integrated authentication. You use a SqlConnection object to connect to the database. You need to create a connection string to TestDB in the instance of SQL Server named CareerPC. Which string should you use?


a. “Data Source= CareerPC; Database=TestDB; Integrated Security=SSP1”.
b. “Data Source= CareerPC; Initial Catalog=TestDB; Integrated Security=SSP1”.
c. “Server= CareerPC; Database=TestDB; Integrated Security=SSP1”.
d. All of the above.
Answer  Explanation 

ANSWER: All of the above.

Explanation:
No explanation is available for this question!


22)   Match the following List 1 with List 2:

a. Control ------------------ i. Controls the output caching policies of a page or user control.
b. MasterType ------------ ii. Page directive uses with user controls.
c. PreviousPageType ---- iii. Enables an ASP.NET page to work with a postback from another page in the application.
d. OutputCache ----------- iv. Associates a class name to a page to get references or members contained within the specified master page.


a. a-ii, b-i, c-iv, d-iii
b. a-ii, b-iv, c-i, d-iii
c. a-ii, b-i, c-iii, d-iv
d. a-ii, b-iv, c-iii, d-i
Answer  Explanation 

ANSWER: a-ii, b-iv, c-iii, d-i

Explanation:
No explanation is available for this question!


23)   ASP.NET Validation Control works 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:
No explanation is available for this question!


24)   Some control, by default, does not cause an automatic PostBack, i.e TextChanged event of TextBox. Which property will you set for automatic postback of these types of controls?

a. isPostBack=”false”
b. isPostBack=”true”
c. PostBack=”true”
d. AutoPostBack=”true”
Answer  Explanation 

ANSWER: AutoPostBack=”true”

Explanation:
No explanation is available for this question!


25)   What is the easiest way in Design view to create an event handler for the default event of a server control?


a. Open the code-behind page and write the code.
b. Right-click the control and select Create Handler.
c. Drag an event handler from the Toolbox to the desired control.
d. Double-click the control.
Answer  Explanation 

ANSWER: Double-click the control.

Explanation:
No explanation is available for this question!


26)   What are the types of Web Server Button Controls that can be created?

a. Only Submit buttons
b. Only Command buttons
c. Submit and command buttons
d. None of the above.
Answer  Explanation 

ANSWER: Submit and command buttons

Explanation:
No explanation is available for this question!