You need to display the value of the master page’s Region property in lblRegion
You are creating an ASP.NET Web site. The site has a master page named Custom.master. The codebehind file for Custom.master contains the following code segment. Partial Public Class Custom
Inherits System.Web.UI.MasterPage Public Property Region As String Protected Sub
Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
End Class
You create a new ASP.NET page and specify Custom.master as its master page. You add a Label
control named lblRegion to the new page. You need to display the value of the master page’s Region
property in lblRegion. What should you do?
What should you do?
You have created an ASP.NET server control named ShoppingCart for use by other developers. Some
developers report that the ShoppingCart control does not function properly with ViewState disabled.
You want to ensure that all instances of the ShoppingCart control work even if ViewState is disabled.
What should you do?
Which control markup should you use?
You are implementing an ASP.NET Web site that will be accessed by an international audience. The
site contains global and local resources for display elements that must be translated into the
language that is selected by the user. You need to ensure that the Label control named lblCompany
displays text in the users selected language from the global resource file. Which control markup
should you use?
You need to ensure that all data that is submitted passes validation before the data is saved in a database
You are developing an ASP.NET Web page that contains input controls, validation controls, and a
button named btnSubmit. The page has the following code-behind. (Line numbers are included for
reference only.)
01 Public Class _Default
02 Inherits System.Web.UI.Page
03
04 Protected Sub SaveToDatabase()
05
06 End Sub
07
08 Protected Sub btnSubmit_Click(ByVal sender As Object,
09 ByVal e As EventArgs) Handles btnSubmit.Click
10
11 End Sub
12
13 End Class
You need to ensure that all data that is submitted passes validation before the data is saved in a
database. What should you do?
Which control should you add?
You are developing an ASP.NET Web application. You create a master page. The master page
requires a region where you can add page-specific content by using the ASP.NET page designer. You
need to add a control to the master page to define the region. Which control should you add?
You need to ensure that the JavaScript code can locate the HTML elements created for each row in these GridVie
You are implementing an ASP.NET application that uses data-bound GridView controls in multiple
pages. You add JavaScript code to periodically update specific types of data items in these GridView
controls. You need to ensure that the JavaScript code can locate the HTML elements created for
each row in these GridView controls, without needing to be changed if the controls are moved from
one page to another. What should you do?
Which page event should you add an event handler to?
You create an ASP.NET page named TestPage.aspx that contains validation controls. You need to
verify that all input values submitted by the user have been validated by testing the Page.IsValid
property. Which page event should you add an event handler to?
You need to ensure that the application checks the database every 10 seconds
You are developing an ASP.NET Web application. Application data is stored in a Microsoft SQL Server
2008 database. You configure a connection string named cnnContoso. The application must cache
the data that is returned from the database by using this connection string. You need to ensure that
the application checks the database every 10 seconds. What should you do?
You need to fix the problem
You are troubleshooting an ASP.NET Web application. System administrators have recently
expanded your web farm from one to two servers. Users are periodically reporting an error message
about invalid view state. You need to fix the problem. What should you do?
You need to ensure that TestPage.aspx can access the CityName property
You are implementing an ASP.NET application that includes a page named TestPage.aspx.
TestPage.aspx uses a master page named TestMaster.master.
You add the following code to the TestPage.aspx code-behind file to read a TestMaster.master public
property named CityName.
Protected Sub Page_Load(ByVal sender As Object,
ByVal e As System.EventArgs) Handles Me.Load
Dim s As String = Master.CityName
End Sub
You need to ensure that TestPage.aspx can access the CityName property. What should you do?