Which code fragment should you use?
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
The application uses ASP.NET AJAX, and you plan to deploy it in a Web farm environment.
You need to configure SessionState for the application.
Which code fragment should you use?
Which code segment should you insert at line 03?
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
The application has a Web form file named MovieReviews.aspx.
The MovieReviews.aspx file connects to a LinqDataSource DataSource named LinqDataSource1 that has a primary key named MovieID.
The application has a DetailsView control named DetailsView1.
The MovieReviews.aspx file contains the following code fragment. (Line numbers are included for reference only.)
01 <asp:DetailsView ID=”DetailsView1″ runat=”server”
02 DataSourceID=”LinqDataSource1″
03
04 />
05 <Fields>
06 <asp:BoundField DataField=”MovieID” HeaderText=”MovieID”
07 InsertVisible=”False”
08 ReadOnly=”True” SortExpression=”MovieID” />
09 <asp:BoundField DataField=”Title” HeaderText=”Title”
10 SortExpression=”Title” />
11 <asp:BoundField DataField=”Theater” HeaderText=”Theater”
12 SortExpression=”Theater” />
13 <asp:CommandField ShowDeleteButton=”false”
14 ShowEditButton=”True” ShowInsertButton=”True” />
15 </Fields>
16 </asp:DetailsView>
You need to ensure that the users can insert and update content in the DetailsView1 control.
You also need to prevent duplication of the link button controls for the Edit and New operations.
Which code segment should you insert at line 03?
What are three possible reasons that could cause this increase?
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
When you review the application performance counters, you discover that there is an unexpected increase in the value of the Application Restarts counter.
You need to identify the reasons for this increase.
What are three possible reasons that could cause this increase? (Each correct answer presents a complete solution. Choose three.)
What should you do?
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
The application uses 10 themes and allows the users to select their themes for the Web page.
When a user returns to the application, the theme selected by the user is used to display pages in the application. This occurs even if the user returns to log on at a later date or from a different client computer.
The application runs on different storage types and in different environments.
You need to store the themes that are selected by the users and retrieve the required theme.
What should you do?
What should you do?
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You add a Web page named HomePage.aspx in the application. The Web page contains different
controls. You add a newly created custom control named CachedControl to the Web page.
You need to ensure that the following requirements are met:
The custom control state remains static for one minute.
The custom control settings do not affect the cache settings of other elements in the Web page.
What should you do?
Which method should you use?
You are creating an ASP.NET application by using the .NET Framework 3.5.
You create an AJAX Web form in the application.
You create an ASP.NET AJAX client-component class in the Web form.
The class will be used in a JavaScript function in the Web form.
You plan to debug the JavaScript function.
You need to display all the fields of the AJAX client-component object in the trace console in the Web form by using the minimum amount of code.
Which method should you use?
Which code segment should you insert at line 06?
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You write the following code segment in the code-behind file to create a Web form. (Line numbers are included for reference only.)
01 string strQuery = “select * from Products;”
02 + “select * from Categories”;
03 SqlCommand cmd = new SqlCommand(strQuery, cnn);
04 cnn.Open();
05 SqlDataReader rdr = cmd.ExecuteReader();
06
07 rdr.Close();
08 cnn.Close();
You need to ensure that the gvProducts and gvCategories GridView controls display the data that is contained in the following two database tables:
The Products database table
The Categories database table
Which code segment should you insert at line 06?
What additional step should you perform?
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You use Windows Authentication for the application.
You set up NTFS file system permissions for the Sales group to access a particular file.
You discover that all the users are able to access the file.
You need to ensure that only the Sales group users can access the file.
What additional step should you perform?
Which code segment should you use?
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You write the following code fragment.
<asp:DropDownList AutoPostBack=”true”
ID=”DropDownList1″ runat=”server”
onselectedindexchanged=
“DropDownList1_SelectedIndexChanged”>
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
</asp:DropDownList>
You also add a MultiView control named MultiView1 to the Web page. MultiView1 has three child View controls.
You need to ensure that you can select the View controls by using the DropDownList1 DropDownList control.
Which code segment should you use?
Which code segment should you insert at line 03?
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
The application has a Web form file named MovieReviews.aspx.
The MovieReviews.aspx file connects to a LinqDataSource DataSource named LinqDataSource1 that has a primary key named MovieID.
The application has a DetailsView control named DetailsView1.
The MovieReviews.aspx file contains the following code fragment. (Line numbers are included for reference only.)
01 <asp:DetailsView ID=”DetailsView1″ runat=”server”
02 DataSourceID=”LinqDataSource1″
03
04 />
05 <Fields>
06 <asp:BoundField DataField=”MovieID” HeaderText=”MovieID”
07 InsertVisible=”False”
08 ReadOnly=”True” SortExpression=”MovieID” />
09 <asp:BoundField DataField=”Title” HeaderText=”Title”
10 SortExpression=”Title” />
11 <asp:BoundField DataField=”Theater” HeaderText=”Theater”
12 SortExpression=”Theater” />
13 <asp:CommandField ShowDeleteButton=”false”
14 ShowEditButton=”True” ShowInsertButton=”True” />
15 </Fields>
16 </asp:DetailsView>
You need to ensure that the users can insert and update content in the DetailsView1 control.
You also need to prevent duplication of the link button controls for the Edit and New operations.
Which code segment should you insert at line 03?