70-515 · Question #10
You create a Web page named TestPage.aspx and a user control named TestUserControl.ascx. TestPage.aspx uses TestUserControl.ascx as shown in the following line of code. <uc:TestUserControl…
The correct answer is A. Add the following line of code to the TestUserControl.ascx.cs code-behind file. C. Add the following code segment to the TestPage.aspx.cs code-behind file. See the full explanation below for the reasoning.
Question
You create a Web page named TestPage.aspx and a user control named TestUserControl.ascx. TestPage.aspx uses TestUserControl.ascx as shown in the following line of code. <uc:TestUserControl ID="testControl" runat="server"/> On TestUserControl.ascx, you need to add a read-only member named CityName to return the value "New York". You also must add code to TestPage.aspx to read this value. Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
Options
- AAdd the following line of code to the TestUserControl.ascx.cs code-behind file.
- BAdd the following line of code to the TestUserControl.ascx.cs code-behind file.
- CAdd the following code segment to the TestPage.aspx.cs code-behind file.
- DAdd the following code segment to the TestPage.aspx.cs code-behind file.
How the community answered
(37 responses)- A73% (27)
- B19% (7)
- D8% (3)
Community Discussion
No community discussion yet for this question.