What are two possible ways to achieve this goal?

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. this.hdr1.InnerHtml = "Text";
B. (hdr1.Parent as HtmlGenericControl).InnerText = "Text";
C. HtmlGenericControl h1 = this.FindControl("hdr1") as HtmlGenericControl;
h1.InnerText = "Text";
D. HtmlGenericControl h1 = Parent.FindControl("hdr1") as HtmlGenericControl;
h1.InnerText = "Text";

microsoft-exams

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.