text manipulation

Discussion in 'ASP .Net' started by jack-e, Aug 9, 2005.

  1. jack-e

    jack-e Guest

    Hi,

    Senario: I'm retrieving some text from a database and when I display
    this text on my page I want the first paragraph to be a different
    color.

    Do I need to break up the values i.e. find where <br><br> occurs and
    substring up to this point. Then have two labels on the form??

    or is there an easier method?

    Thanks!

    Jack
     
    jack-e, Aug 9, 2005
    #1
    1. Advertising

  2. jack-e

    Lucas Tam Guest

    "jack-e" <> wrote in news:1123565399.992699.270660
    @g47g2000cwa.googlegroups.com:

    > Hi,
    >
    > Senario: I'm retrieving some text from a database and when I display
    > this text on my page I want the first paragraph to be a different
    > color.
    >
    > Do I need to break up the values i.e. find where <br><br> occurs and
    > substring up to this point. Then have two labels on the form??


    Depending on how complex the search is, Regular expressions maybe a better
    choice than substrings.

    As for color coding, you can try:

    -Style sheets, assign each paragraph to their own CSS class
    -Rather than use two labels, you can just append some HTML to the database
    text and place the results into a literal.

    But in short, using two labels works just as well : )

    --
    Lucas Tam ()
    Please delete "REMOVE" from the e-mail address when replying.
    http://members.ebay.com/aboutme/coolspot18/
     
    Lucas Tam, Aug 9, 2005
    #2
    1. Advertising

  3. jack-e

    jack-e Guest

    do you know how would i use a regular expression to find when a
    paragraph finishes? (or begins?)
     
    jack-e, Aug 9, 2005
    #3
  4. jack-e

    Oliver Wong Guest

    "jack-e" <> wrote in message
    news:...
    > do you know how would i use a regular expression to find when a
    > paragraph finishes? (or begins?)


    Depends entirely on how the paragraphs are encoded. Earlier you implied
    two consecutive <br> tags, for example. Whenever I write paragraphs in HTML,
    I enclose them in <p> and </p>, so looking for two <br> tags would not work
    with my data.

    - Oliver.
     
    Oliver Wong, Aug 9, 2005
    #4
    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. Mohamed Ahmed Meligy

    Text Manipulation

    Mohamed Ahmed Meligy, Jun 17, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    371
    Hans Kesting
    Jun 17, 2004
  2. Tim Peters
    Replies:
    0
    Views:
    529
    Tim Peters
    Jan 24, 2004
  3. Johhny

    text manipulation

    Johhny, Dec 16, 2005, in forum: Python
    Replies:
    5
    Views:
    510
    BartlebyScrivener
    Dec 16, 2005
  4. ProvoWallis

    NewB question on text manipulation

    ProvoWallis, May 3, 2006, in forum: Python
    Replies:
    4
    Views:
    350
    ProvoWallis
    May 3, 2006
  5. Rex
    Replies:
    2
    Views:
    304
Loading...

Share This Page