You create an ASP.NET page that contains the following tag.
<h1 id=”hdr1″ runat=”server”>Page Name</h1>
You need to write code that will change the contents of the tag dynamically when the page is
loaded. What are two possible ways to achieve this goal? (Each correct answer presents a complete
solution. Choose two.)
A.
Me.hdr1.InnerHtml = “Text”
B.
TryCast(hdr1.Parent, HtmlGenericControl).InnerText = “Text”
C.
Dim h1 As HtmlGenericControl =
TryCast(Me.FindControl(“hdr1”), HtmlGenericControl)
h1.InnerText = “Text”
D.
Dim h1 As HtmlGenericControl =
TryCast(Parent.FindControl(“hdr1”), HtmlGenericControl)
h1.InnerText = “Text”
Explanation:
Topic 2, C#