ASP.NET - Set 6

1)   What is Multiple Active Result Sets (MARS)?


a. It allows execution of multiple batches against Database on a single connection.
b. New feature of SQL SERVER 2005. Previous version of SQL Server does not support this feature.
c. Option A and B are correct.
d. None of the above.
Answer  Explanation 

ANSWER: Option A and B are correct.

Explanation:
No explanation is available for this question!


2)   Which Data Provider gives the maximum performance when connect to SQL Server?

a. The SqlClient data provider.
b. The OLE DB data provider.
c. The Oracle data provider
d. All of the above.
Answer  Explanation 

ANSWER: The SqlClient data provider.

Explanation:
No explanation is available for this question!


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


4)   What are the client-side state management options that ASP.NET supports?

a. Application
b. Session
c. Querystring
d. Option a and b are correct
Answer  Explanation 

ANSWER: Querystring

Explanation:
No explanation is available for this question!


5)   Which Session Mode stores session Information in Current Application Domain?


a. InProc
b. StateServer
c. SQLServer
d. Off
Answer  Explanation 

ANSWER: InProc

Explanation:
No explanation is available for this question!


6)   By default, when you use Page Output Caching, at what location page is cached?

a. Only on web server
b. Only on Client
c. Web server, any proxy servers, and browser
d. All of the above.
Answer  Explanation 

ANSWER: Web server, any proxy servers, and browser

Explanation:
No explanation is available for this question!


7)   What code you will write for using the cache object?

a.
// Storing the value.
Cache["name"]="CareerRide";
// Retrieving the value on any webpage within the application.
if (Cache["name"] != null)
Label1.Text= Cache["name"].ToString();

b.
// Storing the value.
Cache="CareerRide";
// Retrieving the value on any webpage within the application.
if (Cache != null)
Label1.Text= Cache.getStringValue;

c.
// Storing the value.
Cache["name"]="CareerRide";
// Retrieving the value on any webpage within the application.
if (Cache["name"] != null)
Label1.Text= Cache["name"].Text;

d. None of the above.
Answer  Explanation 

ANSWER:
// Storing the value.
Cache["name"]="CareerRide";
// Retrieving the value on any webpage within the application.
if (Cache["name"] != null)
Label1.Text= Cache["name"].ToString();

Explanation:
No explanation is available for this question!


8)   Debug class is available in which namespace?

a. System.Debug
b. System.Data
c. System.Diagnostics
d. None of the above
Answer  Explanation 

ANSWER: System.Diagnostics

Explanation:
No explanation is available for this question!


9)   Match the following List 1 to List 2

a. Literal Control ----------------- i. SingleLine, MultiLine, Password
b. Label Control ------------------ ii. CommandName
c. TextBox Control -------------- iii. Convert to span tag in HTML
d. Button Control ---------------- iv. PassThrough, Encode, Transform mode


a. a-iv, b-iii, c-ii, d-i
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!


10)   You are developing a Web page that contains many validated controls. You want to provide a detailed message for each validation error, but the page doesn’t have sufficient space to provide the detailed message next to each control. What can you do to indicate an error at the control and list the detailed error messages at the top of the Web page?

a.
- Set the Text property of the validator control to the detailed message.
- Set the ErrorMessage property to an asterisk (*).
- Place a ValidationSummary control at the top of the Web page.

b.
- Set the ErrorMessage property of the validator control to the detailed message.
- Set the Text property to an asterisk (*).
- Place a ValidationSummary control at the top of the Web page.

c.
- Set the ToolTip property of the validator control to the detailed message.
- Set the ErrorMessage property to an asterisk (*).
- Place a ValidationSummary control at the top of the Web page.

d. None of the above
Answer  Explanation 

ANSWER:
- Set the ErrorMessage property of the validator control to the detailed message.
- Set the Text property to an asterisk (*).
- Place a ValidationSummary control at the top of the Web page.

Explanation:
No explanation is available for this question!


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

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

ANSWER: ScriptManagerProxy

Explanation:
No explanation is available for this question!


12)   You are writing a page that contains an UpdatePanel for partial-page updates. You want that user should get the message “Processing is going on, please wait.” that the update is processing only if the update takes longer than 5 seconds. Which actions should you take?

a. Add a ProgressBar control to the page. Set the Interval property to 5000. Set the text property as “Processing is going on, please wait.”
b. Add a Timer control to the page. Set the Interval property to 5000. Set its text property to Processing is going on, please wait.”
c. Add an UpdateProgress control to the UpdatePanel. Set its DisplayAfter property to 5000. Set its ProgressTemplate contents to read “Processing is going on, please wait.”
d. None of the above.
Answer  Explanation 

ANSWER: Add an UpdateProgress control to the UpdatePanel. Set its DisplayAfter property to 5000. Set its ProgressTemplate contents to read “Processing is going on, please wait.”

Explanation:
No explanation is available for this question!


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


14)   What are the basic steps to reference master page properties from a content page?


a.
- Create a property in the master page code-behind file.
- Reference the master page property from the content page using the syntax Master.<Property_Name>
b.
- Create a property in the master page code-behind file.
- Add the @ MasterType declaration to the .aspx content page.
- Reference the master page property from the content page using the syntax Master.<Property_Name>

c.
- Create a property in the master page code-behind file.
- Reference the master page property from the content page using the syntax Master.<Property_Name>
d. None of the above
Answer  Explanation 

ANSWER:
- Create a property in the master page code-behind file.
- Add the @ MasterType declaration to the .aspx content page.
- Reference the master page property from the content page using the syntax Master.<Property_Name>

Explanation:
No explanation is available for this question!


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


16)   Which ADO.NET class provide Connected Environment?

a. DataReader
b. DataSet
c. Command
d. None of the above
Answer  Explanation 

ANSWER: DataReader

Explanation:
No explanation is available for this question!


17)   Match the following List 1 to List 2

a. App_Code ------------------------ i.  Assembly Resource Files (.resx)
b. App_Data ------------------------ ii. .skin file, CSS files
c. App_Themes -------------------- iii. .mdf file, .mdb file
d. App_GlobalResources --------- iv. .wsdl files, typed datasets


a. a-iv, b-iii, c-ii, d-i
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-iv, b-iii, c-ii, d-i

Explanation:
No explanation is available for this question!


18)   In ASP.NET application DLL files are stored in which folder?

a. App_Code
b. App_Data
c. Bin
d. App_LocalResources
Answer  Explanation 

ANSWER: Bin

Explanation:
No explanation is available for this question!


19)   What types of data can you store in the Cache collection?

a. Only String Type of Data
b. You can store any type of data in the Cache collection.
c. Only DataSet Object
d. All of the above.
Answer  Explanation 

ANSWER: You can store any type of data in the Cache collection.

Explanation:
No explanation is available for this question!


20)   How many types of parameter supported by OutputCache?

a. VaryByParam
b. VaryByControl
c. VaryByHeader
d. VaryByCustom
e. All of the above
Answer  Explanation 

ANSWER: All of the above

Explanation:
No explanation is available for this question!


21)   You want to secure the connection strings contained within your Web.config file to ensure that no one can open the file easily and see the connection information. Which tool must you use to encrypt the connection strings?

a. ASPNET_WP.EXE
b. ASPNET_REGSQL.EXE
c. ASPNET_REGIIS.EXE
d. None of the above.
Answer  Explanation 

ANSWER: ASPNET_REGIIS.EXE

Explanation:
No explanation is available for this question!


22)   What are the three primary kinds of parameters are used while working with the Stored Procedure in ASP.NET?

a. Input, Integer, String
b. int, varchar, nvarchar
c. Input, Output, InputOutput
d. All of the above.
Answer  Explanation 

ANSWER: Input, Output, InputOutput

Explanation:
No explanation is available for this question!


23)   How do you execute multiple SQL statements using a DataReader?

a. Call the ExecuteReader method of a single Command object twice.
b. Set the Command.CommandText property to multiple SQL statements delimited by a semicolon.
c. Set the Command.CommandType property to multiple result sets.
d. None of the above.
Answer  Explanation 

ANSWER: Set the Command.CommandText property to multiple SQL statements delimited by a semicolon.

Explanation:
No explanation is available for this question!


24)   When a User’s Session times out which event should you respond to?

a. Application_Start
b. Session_End
c. Session_Start
d. Application_End
Answer  Explanation 

ANSWER: Session_End

Explanation:
No explanation is available for this question!


25)   Which of the following Web.config files correctly enables the Web application to track the LastVisit of anonymous users in a variable of type DateTime?


a.
<anonymousIdentification enabled="true"/>
<profile>
<properties>
<add name="LastVisit" type="System.DateTime" allowAnonymous="true" />
</properties>
</profile>
b.
<anonymousIdentification enabled="true"/>
<profile>
<properties>
<add name=" LastVisit " allowAnonymous="true" />
</properties>
</profile>
c.
<anonymousIdentification enabled="true" />
<profile>
< properties>
< add name=" LastVisit " type="System. DateTime " />
</properties>
</profile>
d.
<profile>
<properties>
<add name="LastVisit" type="System. DateTime "/>
</properties>
</profile>

Answer  Explanation 

ANSWER:
<anonymousIdentification enabled="true"/>
<profile>
<properties>
<add name="LastVisit" type="System.DateTime" allowAnonymous="true" />
</properties>
</profile>

Explanation:
No explanation is available for this question!