Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Refernecing Text of <p> tags

Reply
Thread Tools

Refernecing Text of <p> tags

 
 
=?Utf-8?B?SmltIEhlYXZleQ==?=
Guest
Posts: n/a
 
      11-11-2004
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
 
Reply With Quote
 
 
 
 
Craig
Guest
Posts: n/a
 
      11-11-2004
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:548BE162-34C4-47EB-B1F9-...
> 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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
All style tags after the first 30 style tags on an HTML page are not applied in Internet Explorer Rob Nicholson ASP .Net 3 05-28-2005 03:11 PM
Evaluating struts tags inside my own custom tags... A. Brinkmann Java 2 04-16-2004 07:44 AM
JSP newbie - use include, custom tags, standard tags - or what? Mike Java 3 01-09-2004 09:30 AM
RegEx to find CFML tags nested in HTML tags Dean H. Saxe Perl 0 01-03-2004 06:11 PM
Custom Tags within Custom Tags. Ranganath Java 2 10-21-2003 06:14 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57