Is there a way to add HTML markup to a Textbox.Text property?

Discussion in 'ASP .Net' started by =?Utf-8?B?bmhheWRvbg==?=, Jul 20, 2006.

  1. There has to be way to do this. Any help would be appreciated. Here is the
    code.

    txtReturn.Text = data[0] + Environment.NewLine +
    data[1] + Environment.NewLine +
    data[2] + Environment.NewLine +
    data[3] + Environment.NewLine +
    data[4] + Environment.NewLine +
    data[5] + Environment.NewLine +
    data[6] + Environment.NewLine +
    "<bold>Phone: </bold>" + data[7] + Environment.NewLine +
    "Territory: " + data[8];
    =?Utf-8?B?bmhheWRvbg==?=, Jul 20, 2006
    #1
    1. Advertising

  2. A textbox is not capable of rendering HTML. You would have to put HTML into
    a div or an element like that. You can have a DIV that is editable, so it
    will look a lot like a textbox.

    "nhaydon" <> wrote in message
    news:...
    > There has to be way to do this. Any help would be appreciated. Here is the
    > code.
    >
    > txtReturn.Text = data[0] + Environment.NewLine +
    > data[1] + Environment.NewLine +
    > data[2] + Environment.NewLine +
    > data[3] + Environment.NewLine +
    > data[4] + Environment.NewLine +
    > data[5] + Environment.NewLine +
    > data[6] + Environment.NewLine +
    > "<bold>Phone: </bold>" + data[7] + Environment.NewLine +
    > "Territory: " + data[8];
    Marina Levit [MVP], Jul 20, 2006
    #2
    1. Advertising

  3. =?Utf-8?B?bmhheWRvbg==?=

    Ray Booysen Guest

    What you're looking for is the literal control. This will do exactly as
    you require.

    Regards
    Ray

    nhaydon wrote:
    > There has to be way to do this. Any help would be appreciated. Here is the
    > code.
    >
    > txtReturn.Text = data[0] + Environment.NewLine +
    > data[1] + Environment.NewLine +
    > data[2] + Environment.NewLine +
    > data[3] + Environment.NewLine +
    > data[4] + Environment.NewLine +
    > data[5] + Environment.NewLine +
    > data[6] + Environment.NewLine +
    > "<bold>Phone: </bold>" + data[7] + Environment.NewLine +
    > "Territory: " + data[8];
    Ray Booysen, Jul 20, 2006
    #3
    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. Toska
    Replies:
    1
    Views:
    335
    =?ISO-8859-1?Q?Anders_Nor=E5s?=
    Jan 30, 2005
  2. Toska
    Replies:
    0
    Views:
    303
    Toska
    Jan 31, 2005
  3. Joshua Beall
    Replies:
    1
    Views:
    407
    Bertilo Wennergren
    Dec 10, 2003
  4. geoffbache
    Replies:
    8
    Views:
    589
    Stefan Behnel
    Feb 11, 2008
  5. Andy Fish
    Replies:
    1
    Views:
    187
    Andy Fish
    Oct 27, 2004
Loading...

Share This Page