preserving the layout of text input via text input control

Ok

 

what I want to do is, when using the text input control all cr, lf, crlf and spaces are preserved when the content is input in a db and that the information/layout is preserved when viewing it in a text input filed or grid control.

any ideas

 

 

jim

0
chaloum
9/21/2006 7:56:10 AM
asp.net.presentation-controls 72751 articles. 3 followers. Follow

4 Replies
724 Views

Similar Articles

[PageSpeed] 16

When you input text via a multiline textbox and insert it into a database your specified line breaks will be maintained. When retrieving the record, you will need to do a replace on the string in order to interpret these line breaks in your html:

myField.Replace("\n", "<br />")

Does this answer your question?

Lee Wilson


Coolest Bananas
0
lee
9/21/2006 1:03:57 PM
so how do you do that with the grid control??
0
chaloum
9/21/2006 1:23:33 PM
0
lee
9/21/2006 2:12:14 PM

no that doesnt work gives dosnt like the (string) nor the formatstring items.

 

any other ideas??

 

 

please

 thanks

Marcel

0
chaloum
9/22/2006 12:39:34 AM
Reply:

Similar Artilces:

Fix broken text wrapping and control input text length in TextBox control
Hi! I'm developing a(nother; it's my second!) ASP.NET application that right now is giving me fits. On one of my screens, the user needs to be able to enter large amounts of text into three database fields. The database fields are all char(350). I'm having two problems with this. First of all, I found that when editing an existing record, text in the fields would wrap in a manner similar to this: Wow, what a sorryperformance! The text box is much wider than the text "Wow, what a sorry", so I couldn't figure out why the text was wrapping. I tried setting the Columns property to 90 (which...

Changing the text of an input (text) control
Hi everyone, please answer the following: I have a html input control as follows  <input id="newSearch_keywords" type="text" class="text" value="<%=JobsSearchBusinessObject.CurrentKeywords %>" name="newSearch_keywords""/>    When the page loads I need to look at the text of this input field and remove any * chars that are in the text. Thanks for your help <input id="newSearch_keywords" type="text" class="text" value="<%=JobsSearchBusinessObject.CurrentKeywords.Re...

unable to input into the input type=text control
i am dynamically creating some controls on the form using javascript in which i have an input control which is text box but when i try to input some thing it is not taking anything what could be wrong. I found that i am populating a Message window n if it is poped the input control is not accepting anything n when it is off it is taking input.  the code for message window is as below can somebody find it out what is wrong in the below code which is preventing me to input text in the input control when it is populated.   MessageWindow = new Window('MessageWindowId'...

Which validation control to use to control input textbox text length ?
I have a formview to insert record and I want one field to limit to text char length of 50. Which validation control I should use and how to set it ? ThanksThanks in advance for the help. I will try to credit the ones who helped but most important is we really do sincerely thanks to all who have helped. Check this link.. http://www.codeproject.com/KB/aspnet/Textarea_Length_Validator.aspx Edit: If it is normal single line TextBox, you can set "MaxLength"..Check this code..   <asp:FormView runat="server" ID="formView1" > <...

Setting the height of a Text Input Control on a User Defined Control
I have a user defined control. I am using absolute positioning. I am setting the height and width of a text input using an embedded style. It look fine in the user control window but when I insert the user control onto a page, the heigth of the text control is too large. I cannot seem to control the height on the page I place the user control onto. Any help?Virtually yoursWilliam Main Hi, I think it is better to create the user control to be created as  position = Static to get more layout control of the web user control when used in other pages. For more layout control on all ...

Updating a timepicker control via text input
I have the following control in my XUL application: <timepicker id="time-picker" onchange="alert('time-picker: ' + this.dateValue);" hideseconds="true"> I'm having problems where the control doesn't seem to be updating correctly. If I change the values in the control using the up/down arrows and the mouse, the alerts contain the modified values. However, if I use the keyboard, enter text in one of the fields (for example, change the hour), and then hit tab,...

chinese character in rich text control and text control
I have a chinese character in either rich text control or text control. The character is look fine if it is a small size (10, 12), however when the font size is changed bigger (36 or 72), the character is out of shape(many dot, not smooth). Is anyone has any idea to print a bigger chinese character from pb7.03. ...

How to populate other text controls by losing focus of one text control
 Hi All,Iam new to ASP.net. Here is a small illustration about my prob. I have 3 text controls in a page i.e which represents zip,city,state. I want to populate city and state after entering zipcode into zip text control i.e something like focus lost event on zip text control. Any solution regarding this thanks and regards,vijaycanaan How about OnTextChange: http://msdn.microsoft.com/en-us/library/aa710190(VS.71).aspx EricPascarello.com | Twitter epascarello | LinkedIn Hi vijaycanaan We can capture the following event when TextBox  lost focus: On Server-Side:We...

How do you Highlight text in input control when it has the focus
Hi All, My question is How do you Highlight text in an input control when you tab to the control? Thanks In Advance Try:this.TextBox1.Attributes.Add("onfocus", "javascript:document.getElementById('" + this.TextBox1.ClientID + "').select();"); this.TextBox2.Attributes.Add("onfocus", "javascript:document.getElementById('" + this.TextBox2.ClientID + "').select();"); this.TextBox3.Attributes.Add("onfocus", "javascript:document.getElementById('" + this.TextBox3.ClientID + "').select(...

MS Publisher / Word-like textframe web control... flowing text between text controls
Does anyone know of an ASP.Net web control capable of linking text boxes/frames together similarly to the Publisher & Word textframe objects (via the NextLinkedTextFrame property in Publisher or the TextFrame.Next property in Word)? The goal is to have text flow from one textbox into another. Thx.....

Disabling a text box control so no input is allowed
Ok i have a textbox control that is used for inputing a phone number. If the person does not want to change their existing number i disable the text box control by doing this: PhoneNumberEF.Enabled = false; The problem is that this grey's the text box out but you can still place the cursor in it and type. Which may enable the not-so-saavy user to believe he can change the phone number. I want to prevent the user from being able to type in the text box at all. What property do i need to set? Thanks, -=angst=- Try the ReadOnly property. hope this helps, sivilianMy W...

Regular Expression to Control Input To Text Box
Dear All,              I am new to all this regular expression I need a small help. I want to disable a certain character to be input into my text box such , > < # etc. So I want to control it via regular expression. How can I do it please ? Thanks.  Get yourself a copy of Expresso (a free download from http://www.ultrapico.com/Expresso.htm) This will allow you you write and test expression before using them in your program. Remember that all client side code such as a regular expression validator are a convenianc...

How can I control text inputs autocomplete behavior?
I am very new to developing firefox extensions and I am wondering whether it is possible to add some more sophisticated autocomplete behavior to a specific text input. In particular, I would like to provide my own source of autocomplete entries, instead of using the form history default behavior. Thank you in advance for your help and consideration, Dado ...

How to programmatically add user control to the middle of text inside Literal text control ? Pls help...
Greetings fellow programmers,I greatly appreciate all the help I can get. Here is the problem.I have a function that pulls content from the database and put the content into a literal control. Somewhere in that content, I need to insert a user control (bla.ascx). Ideally, I want to use string.replace to find the location where I want to insert the user control. But I can't... there is no such option on the literal control methods and properties.Do I have to overwrite render method? I'd normally use loadcontrol and add it to the placeholder control, but in this case, I can't dynamically ...

Web resources about - preserving the layout of text input via text input control - asp.net.presentation-controls

Limit-preserving function (order theory) - Wikipedia, the free encyclopedia
In the mathematical area of order theory , one often speaks about functions that preserve certain limits, i.e. certain suprema or infima . Roughly ...

Preserving Security in Belgium
My job at Facebook is to keep the 1.5 billion people using our service safe. That's what motivates me every day, and when one of our important ...

Scripting News: Preserving the early blogosphere.
... in a future context. Basically, anything that isn't completely ephemeral. We complain that the UGC companies aren't doing a good job of preserving ...

Preserving - Obama for America TV Ad - YouTube
Get the facts: http://OFA.BO/c12hHD Voiceover: "It's true, Mitt Romney will replace Medicare's guaranteed benefits with a voucher system. The ...

Canberra's local shops are worth preserving
Much of the debate about planning the future of Canberra in recent months has focused on the big picture visions.

Should Germany Spend Millions Preserving Nazi Rally Grounds?
At the height of his career as the architect of the Third Reich, Albert Speer was already imagining what his buildings would look like as ruins. ...

Border Force: preserving freedom doesn't sit with governments
Plans for a paramilitary-style operation in Melbourne's CBD were always going to lead to overreach, argues Tim Wilson.

Sepp Blatter's resignation is about preserving the 'FIFA Way'
This isn't a Damascene conversion from the FIFA president. It's more akin to a circling of the wagons by his close associates to try to rescue ...

Preserving Old Quebec City
Relive Canada's history through CBC Radio and Television. This free site features thousands of radio and television clips from the archives of ...

Pakistan’s vintage car collectors preserving a part of history
Among rich Pakistanis, the desire to own and restore classic automobiles has been growing

Resources last updated: 12/18/2015 12:55:56 AM