473,394 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Simple question number 2

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
Nov 18 '05 #1
2 841
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:
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

Nov 18 '05 #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" <Ma*********@discussions.microsoft.com> wrote in message
news:3A**********************************@microsof t.com...
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

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Seth | last post by:
I want to create a simple hash function that can hash strings. Currently I'm storing passwords as strings in a DB but want to store them as a hash. I don't need any proper standardised hashing e.g....
11
by: JKop | last post by:
Take the following simple function: unsigned long Plus5Percent(unsigned long input) { return ( input + input / 20 ); } Do yous ever consider the possibly more efficent:
11
by: greg.scharlemann | last post by:
I've been playing with this form validation method for a while and have tried an array of things but haven't had any luck with a couple items. 1. The validateForm() function doesn't detect when...
5
by: awasthi.ashish | last post by:
Hi friends, I am writing a simple program to convert an IP address from a hexadecimal form to dotted-notation form. However, for some reason I am having problem getting it to work.Here it is: ...
18
by: Bob Cummings | last post by:
Not sure if this is the correct place or not. Anyhow in school we were taught that when trying to calculate the efficiency of an algorithm to focus on something called FLOPs or Floating Point...
4
by: dba_222 | last post by:
Dear Experts, Ok, I hate to ask such a seemingly dumb question, but I've already spent far too much time on this. More that I would care to admit. In Sql server, how do I simply change a...
1
by: Synapse | last post by:
Hello... We were asked to create a simple calculator program in our C++ subject by using loops only. i have a problem in creating a loop in the multiplication and division operation so please can...
1
by: =?ISO-8859-1?Q?Tor_Erik_S=F8nvisen?= | last post by:
Hi, A while ago I asked a question on the list about a simple eval function, capable of eval'ing simple python constructs (tuples, dicts, lists, strings, numbers etc) in a secure manner:...
2
by: astrogirl77 | last post by:
Hi, I'm new to Python and am hoping to find help with coding a Python script, applet. I code in an old version of Visual Basic 4.0, I have a simple app that is about 3 and a half pages of code...
1
by: astrogirl77 | last post by:
I'm new to C++ and am hoping to find help with coding a simple C program, am wanting to obtain code and functioning exe's. I code in an old version of Visual Basic 4.0, I have a simple app that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.