Test
4 Exam
Exam : Microsoft 70-515
Title :
•
Web Applications Development
w/Microsoft .NET Frmwk 4
Version : demo
Test4Exam- Leading the way in studying IT certificaiton
Test
4 Exam
Question: 1
You are implementing an ASP.NET application that uses data-bound GridView controls in multiple pages. You add
JavaScript code to periodical y 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 pa to another. What should you do?
A. Replace the GridView control with a ListView control.
B. Set the ClientIDMode at ribute to Predictable in the web.config file.
C. Set the ClientIDRowSuf ix at ribute of each unique GridView control to a dif erent value.
D. Set the @ OutputCache directive’s VaryByControl at ribute to the ID of the GridView control.
Answer: C
Question: 2
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 fol owing code to the TestPage.aspx code-behind file to read a
TestMaster.master public property named CityName.
Test4Exam help you Test any it exam!
http://www.Test4Exam.com
Test
4 Exam
protected void Page_Load(object sender, EventArgs e).
{ string s = Master.CityName;.
} You need to ensure that TestPage.aspx can access the CityName property. What should you do?
A. Add the fol owing directive to TestPage.aspx.
B. Add the fol owing directive to TestPage.aspx.
C. Set the Strict at ribute in the @ Master directive of the TestMaster.master page to true.
D. Set the Explicit at ribute in the @ Master directive of the TestMaster.master page to true.
Answer: A
Question: 3
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 fol owing 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,
Test4Exam help you Test any it exam!
http://www.Test4Exam.com
Test
4 Exam
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?
A. Add the fol owing directive to TestPage.aspx.
B. Add the fol owing directive to TestPage.aspx.
C. Set the Strict at ribute in the @ Master directive of the TestMaster.master page to true.
D. Set the Explicit at ribute in the @ Master directive of the TestMaster.master page to true.
Answer: A
Question: 4
You are implementing an ASP.NET page. You add asp:But on controls for Help and for Detail. You add an ASP.NET skin file
named default.skin to a theme. You need to create and use a separate style for the Help but on, and you must use the default
style for the Detail but on. What should you do?
Test4Exam help you Test any it exam!
http://www.Test4Exam.com
Test
4 Exam
A. Add the fol owing markup to the default.skin file.
Use the fol owing markup for the but ons in the ASP.NET page.
Help
Detail
B. Add the fol owing markup to the default.skin file.
Use the fol owing markup for the but ons in the ASP.NET page.
Help
Detail
C. Add the fol owing code segment to default.skin.
Use the fol owing markup for the but ons in the ASP.NET page.
Test4Exam help you Test any it exam!
http://www.Test4Exam.com
Test
4 Exam
Detail
D. Add the fol owing markup to default.skin.
Answer: D
Question: 5
You are creating an ASP.NET Web site. The site has a master page named Custom.master. The code-behind file for
Custom.master contains the fol owing code segment. public partial class CustomMaster : MasterPage
{
public string Region
{
get; set;
}
protected void Page_Load(object sender, EventArgs e)
{
Test4Exam help you Test any it exam!
http://www.Test4Exam.com
Test
4 Exam
}
}
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?
A. Add the fol owing code segment to the Page_Load method of the page code-behind file.
CustomMaster custom = this.Parent as CustomMaster;
lblRegion.Text = custom.Region;
B. Add the fol owing code segment to the Page_Load method of the page code-behind file.
CustomMaster custom = this.Master as CustomMaster;
lblRegion.Text = custom.Region;
C. Add the fol owing code segment to the Page_Load method of the Custom.Master.cs code-behind file.
Label lblRegion = Page.FindControl("lblRegion") as Label;
lblRegion.Text = this.Region;
D. Add the fol owing code segment to the Page_Load method of the Custom.Master.cs code-behind file.
Test4Exam help you Test any it exam!
http://www.Test4Exam.com
Test
4 Exam
Label lblRegion = Master.FindControl("lblRegion") as Label;
lblRegion.Text = this.Region;
Answer: B
Question: 6
You are creating an ASP.NET Web site. The site has a master page named Custom.master. The code-behind file for
Custom.master contains the fol owing 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?
A. Add the fol owing code segment to the Page_Load method of the page code-behind file.
Test4Exam help you Test any it exam!
http://www.Test4Exam.com
Test
4 Exam
Dim custom As Custom = Me.Parent
lblRegion.Text = custom.Region
B. Add the fol owing code segment to the Page_Load method of the page code-behind file.
Dim custom As Custom = Me.Master
lblRegion.Text = custom.Region
C. Add the fol owing code segment to the Page_Load method of the Custom.Master.vb code-behind file.
Dim lblRegion As Label = Page.FindControl("lblRegion")
lblRegion.Text = Me.Region
D. Add the fol owing code segment to the Page_Load method of the Custom.Master.vb code-behind file.
Dim lblRegion As Label = Master.FindControl("lblRegion")
lblRegion.Text = Me.Region
Answer: B
Question: 7
Test4Exam help you Test any it exam!
http://www.Test4Exam.com
Test
4 Exam
You are implementing an ASP.NET Web site. The site al ows users to explicitly choose the display language for the site’s
Web pages. You create a Web page that contains a DropDownList named ddlLanguage, as shown in the fol owing code
segment.
AutoPostBack="True" ClientIDMode="Static"
OnSelectedIndexChanged="SelectedLanguageChanged">
English
Spanish
French
German
The site contains localized resources for al page content that must be translated into the language that is selected by the
user.
You need to add code to ensure that the page displays content in the selected language if the user selects a language in the
drop-down list.
Which code segment should you use?
A. protected void SelectedLanguageChanged(object sender, EventArgs e)
{
Test4Exam help you Test any it exam!
http://www.Test4Exam.com
Add New Comment