Simple question number 2

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
 
G

Guest

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

Kevin Spencer

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

Similar Threads

Simple database front-end for simple small business 7
Mini Web Server in C++ (Part One) 4
Tasks 1
Question about my projects 3
Need help with code on website (noob) 2
Simple Question 2
Question 2
simple question 3

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top