Refernecing Text of <p> tags

Discussion in 'ASP .Net' started by =?Utf-8?B?SmltIEhlYXZleQ==?=, Nov 11, 2004.

  1. 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
    =?Utf-8?B?SmltIEhlYXZleQ==?=, Nov 11, 2004
    #1
    1. Advertising

  2. =?Utf-8?B?SmltIEhlYXZleQ==?=

    Craig Guest

    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

    "Jim Heavey" <> wrote in message
    news:...
    > 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
    Craig, Nov 11, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dean H. Saxe
    Replies:
    0
    Views:
    1,005
    Dean H. Saxe
    Jan 3, 2004
  2. Rob Nicholson
    Replies:
    3
    Views:
    641
    Rob Nicholson
    May 28, 2005
  3. Ranganath

    Custom Tags within Custom Tags.

    Ranganath, Oct 17, 2003, in forum: Java
    Replies:
    2
    Views:
    435
    Ranganath
    Oct 21, 2003
  4. Mike
    Replies:
    3
    Views:
    854
    Michael Borgwardt
    Jan 9, 2004
  5. A. Brinkmann
    Replies:
    2
    Views:
    1,061
    A. Brinkmann
    Apr 16, 2004
Loading...

Share This Page