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?
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?
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create a custom Web user control named SharedControl. The control will be compiled as a library. You write the following code segment for the SharedControl control. (Line numbers are included for reference only.)
01 protected override void OnInit(EventArgs e)
02 {
03 base.OnInit(e);
04
05 }
All the master pages in the ASP.NET application contain the following directive.
<%@ Master Language="C#" EnableViewState="false" %>
You need to ensure that the state of the SharedControl control can persist on the pages that reference a master page. Which code segment should you insert at line 04?
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.
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?
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You write the following code fragment. (Line numbers are included for reference only.)
01 02 ID="rfValidator1" runat="server"
03 Display="Dynamic" ControlToValidate="TextBox1"
04
05 >
06
07
08
09
10 ID="ValidationSummary1" runat="server" />
You need to ensure that the error message displayed in the validation control is also displayed in the validationsummary list. 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 fragment. ID="DropDownList1" runat="server"
onselectedindexchanged=
"DropDownList1_SelectedIndexChanged"> 1 2 3
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?
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. The computer that hosts the ASP.NET Web application contains a local instance of Microsoft SQL Server 2005. The instance uses Windows Authentication. You plan to configure the membership providers and the role management providers. You need to install the database elements for both the providers on the local computer. What should you do?
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?
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. OnClick="btnSearch_Click" /> 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?