Refernecing Text of <p> tags

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

If I have some text which is between <p> tags, is there a way for me to
change the text which is in between the tags? I know that I could convert it
to a Label control and reference it that way, but I was wondering if there
was another way to do this.

<p id="Fred" style="Visibility: hidden">This is my Text</p>

Fred.?

Thanks
 
Hi Fred.

Here's a quick n dirty vb example.

<your aspx html>
<p runat="server" id="myptag"></p>
</your aspx html>

<your code behind file>
Protected WithEvents myptag As
System.Web.UI.HtmlControls.HtmlGenericControl

myptag.InnerText = "Some text here"
</your code behind file>

HTH
Craig
 
Back
Top