What should you do?
You create a Microsoft ASP.NET AJAX application by using the Microsoft .NET Framework version 3.5.
You attach Microsoft Visual Studio 2008 debugger to the Microsoft Internet Explorer instance to debug the JavaScript code in the AJAX application.
You need to ensure that the application displays the details of the client-side object on the debugger console.
What should you do?
Which code segment should you use?
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You create a Web page named enterName.aspx.
The Web page contains a TextBox control named txtName.
The Web page cross posts to a page named displayName.aspx that contains a Label control named lblName.
You need to ensure that the lblName Label control displays the text that was entered in the txtName TextBox control.
Which code segment should you use?
Which code segment should you use?
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You create a Web page named Default.aspx in the root of the application.
You add an ImageResources.resx resource file in the App_GlobalResources folder. The ImageResources.resx file contains a localized resource named LogoImageUrl.
You need to retrieve the value of LogoImageUrl. Which code segment should you use?
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?
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:ListBox SelectionMode=”Multiple” ID=”ListBox1″ runat=”server”></asp:ListBox>
<asp:ListBox ID=”ListBox2″ runat=”server”></asp:ListBox>
<asp:Button ID=”Button1″ runat=”server” Text=”Button” onclick=”Button1_Click” />
You need to ensure that when you click the Button1 control, a selected list of items move from the ListBox1 control to the ListBox2 control.
Which code segment should you use?
What should you do?
You are maintaining an ASP.NET application by using the .NET Framework 3.5.
The application uses Forms authentication.
Security testing of the application reveals that users can access the sessions of other users on different computers.
You need to configure the application to eliminate the vulnerability.
What should you do?
Which code segment you should insert at line 12?
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You create a Web form that contains the following code fragment.
<asp:TextBox runat=”server” ID=”txtSearch” />
<asp:Button runat=”server” ID=”btnSearch” Text=”Search”
OnClick=”btnSearch_Click” />
<asp:GridView runat=”server” ID=”gridCities” />
You write the following code segment in the code-behind file. (Line numbers are included
for reference only.)
01 protected void Page_Load(object sender, EventArgs e)
02 {
03 DataSet objDS = new DataSet();
04 SqlDataAdapter objDA = new SqlDataAdapter(objCmd);
05 objDA.Fill(objDS);
06 gridCities.DataSource = objDs;
07 gridCities.DataBind();
08 Session[“ds”] = objDS;
09 }
10 protected void btnSearch_Click(object sender, EventArgs e)
11 {
12
13 }
You need to ensure that when the btnSearch Button control is clicked, the records in
the gridCities GridView control are filtered by using the value of the txtSearch TextBox.
Which code segment you should insert at line 12?
Which code segment should you use?
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You create a Web page named enterName.aspx.
The Web page contains a TextBox control named txtName.
The Web page cross posts to a page named displayName.aspx that contains a Label control named lblName.
You need to ensure that the lblName Label control displays the text that was entered in the txtName TextBox control.
Which code segment should you use?
What should you do?
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5.
You write the following code segment to create a client-script function. (Line numbers are included for reference only.)
01 function updateLabelControl(labelId, newText) {
02 var label = $find(labelId);
03 label.innerHTML = newText;
04 }
The client script function uses ASP.NET AJAX and updates the text of any Label control in the Web form.
When you test the client script function, you discover that the Label controls are not updated. You receive the following JavaScript error message in the browser: “‘null’ is null or not an object.”
You need to resolve the error.
What should you do?
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?