Simple question number 2

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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!
***************************
 
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top