Connecting Tech Pros Worldwide Help | Site Map

Simple question number 2

Manny Chohan
Guest
 
Posts: n/a
#1: Nov 18 '05
Hi Guys, My code is getting the strings from the database and due to the fact
that some of the strings have html tags in them i am using textarea to
maintain all the new lines etc instead of label which concatenates everything
in one line.
How can i reserve a space on the page and have codebehind write in that area
so that i can get rid of text area?

Thanks
Manny
Cowboy (Gregory A. Beamer) - MVP
Guest
 
Posts: n/a
#2: Nov 18 '05

re: Simple question number 2


If you want to format a space for a blob of text, consider moving away from
HTML tables and using CSS. You can then chop things up however you like. This
can also be used to solve your hyperlink spacing problem.

Carving out a space, on a simpler level, can be accomplished by dropping a
Panel control on the page and attaching the text you are outputting into this
Panel as a literal control.

Panel1.Controls.Add(new LiteralControl(myTextString));


---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************

"Manny Chohan" wrote:
[color=blue]
> Hi Guys, My code is getting the strings from the database and due to the fact
> that some of the strings have html tags in them i am using textarea to
> maintain all the new lines etc instead of label which concatenates everything
> in one line.
> How can i reserve a space on the page and have codebehind write in that area
> so that i can get rid of text area?
>
> Thanks
> Manny[/color]
Kevin Spencer
Guest
 
Posts: n/a
#3: Nov 18 '05

re: Simple question number 2


Use Server.HtmlEncode(string) to HTMLEncode the text. Then it can be
displayed in an HTML document as HTML. That is, any HTML tags will be
HTML-Encoded to be the HTML for those characters. When viewed in a browser,
it will look like the original text.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Manny Chohan" <MannyChohan@discussions.microsoft.com> wrote in message
news:3A2C4C73-A4C9-4271-B5BA-F8A437748F29@microsoft.com...[color=blue]
> Hi Guys, My code is getting the strings from the database and due to the[/color]
fact[color=blue]
> that some of the strings have html tags in them i am using textarea to
> maintain all the new lines etc instead of label which concatenates[/color]
everything[color=blue]
> in one line.
> How can i reserve a space on the page and have codebehind write in that[/color]
area[color=blue]
> so that i can get rid of text area?
>
> Thanks
> Manny[/color]


Closed Thread