473,385 Members | 2,013 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,385 software developers and data experts.

HTML formatting

I want to format all kind of input in text area like line break, numbered list etc whatever user enters just like if I'm writting right now in text area(on bytes) and it will printed on screen as I'm entering. Is there any inbuilt function in .net framework by which I can achieve this functionality? I'm working on web site where user will enter some detailed description in text area. Now user can input text which may contain line break, list, etc. I will store this in database and will retrieve on page as per the query fired from web page. But the problem is when user enters the text in text area and clicks submit, it gets stored in database in incorrect format like all the lines, bulleted lists are stored in the continuation without formatting. I don't bother how it gets stored in database but concerned about putting on the page after fetching from database in the same format as user entered previously.
Thanks.
Apr 17 '10 #1
2 1390
yarbrough40
320 100+
Look at the StringReader/StringWriter classes or the Replace() function. What you ultimately need to do is modify the text when the HTML is created, for instance making double spaces in the text now show as a built in function e.g. "VbCrlf" or "Chr(10) & Chr(13)". Or you could replace it with an HTML tag such as "<br />" or "<p />" etc.

That is the way I handle these things... perhaps one of the Bytes site admins can explain how it works in this forum... if I hit Return while I type in this box right now, it ultimately renders on the board as a carriage return - I have no idea how they are handling that... anyone?
Apr 21 '10 #2
Thank you yarbrough40.
Jun 15 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

27
by: Fuli Chang | last post by:
I don't like other people see my html code. Is there a way to hide it? Thanks.
8
by: Seth | last post by:
How can I completely turn off the auto formatting of Html in Visual Studio 7? I have tried all possible combinations (at least I think I have) of the Tools / Options / Text Editor / HTML XML /...
258
by: Terry Andersen | last post by:
If I have: struct one_{ unsigned int one_1; unsigned short one_2; unsigned short one_3; }; struct two_{ unsigned int two_1;
1
by: coder10 | last post by:
Two things 1. Why does ASP.Net not respect code formatting for the HTML tags. I mean, when I write my HTML, I try to use appropriate tabs and spaces and lines beween my tags, but when I save and...
10
by: Coleen | last post by:
Hi all :-) I have a weird formatting problem with an HTML table that I am populating using VB.Net and HTML. Here is the snippet of code for the cell I'm trying to format: Dim...
4
by: Arthur Dent | last post by:
Hello all, ive been programming with ASP.NET since it came out, but am just getting my feet with now with v.2. Ive noticed something strange in the way my HTML tables get rendered with 2. I use...
3
by: realmerl | last post by:
Hi All. I'm trying to transform a html document into plain text via xslt. Simple you say! (i hope) I have got it working, by using the magnificent <xsl:value-of select="."/>. This returns the...
3
sanjay123456
by: sanjay123456 | last post by:
Dear friends, <?php //define the receiver of the email $to = 'sanjay.mit@gmail.com'; //define the subject of the email $subject = 'Test HTML email'; //create a boundary string. It must be...
5
by: Surbhi | last post by:
Hi We have HTML datasheets but now we want then in PDF format because page layout is very bad when HTML is printed. I am through with the XML and XSLT part. But donot hav any idea of XSL- FO....
3
by: CJM | last post by:
David, Thanks for the reply. Responses inline: "David E. Ross" <nobody@nowhere.notwrote in message news:OZadnaBdOMGpYb3VnZ2dnUVZ_vOdnZ2d@softcom.net... This is a promotional mailshot so...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.