| | |
Replacing "Enter" in textBox
Please support our ASP.NET advertiser: Intel Parallel Studio Home
![]() |
chr13
or
VbCrLf
or
VbCrLf
Last edited by extofer; Sep 22nd, 2006 at 8:26 pm.
Gabriel Villa
software development/ IT support consultant
software development/ IT support consultant
Hi,
I've tried this but it's not working... I've also tried
or
but it's not working too... So simple thing is so hard to do :cheesy: By the way - it's C# code.
Steve
I've tried this but it's not working... I've also tried
TextBox1.Text.Replace("\r\n", "</br>");or
TextBox1.Text.Replace(Convert.ToString((char)13), "</br>");but it's not working too... So simple thing is so hard to do :cheesy: By the way - it's C# code.
Steve
Last edited by Stivi; Sep 23rd, 2006 at 9:33 am.
Try this:
ASP.NET Syntax (Toggle Plain Text)
Me.MyLiteral.Text = Me.MyTextBox.Text.Replace(ControlChars.NewLine, "<br />")
•
•
Join Date: Jun 2005
Posts: 49
Reputation:
Solved Threads: 1
ASP.NET Syntax (Toggle Plain Text)
string text = txtBody.Text.Replace(Environment.NewLine, "<br />");
ASP.NET Syntax (Toggle Plain Text)
message.From = new MailAddress(txtFrom.Text); message.Sender = new MailAddress(txtFrom.Text); message.To.Add(txtTo.Text); message.Subject = txtSubject.Text; message.IsBodyHtml = true; string text = txtBody.Text.Replace(Environment.NewLine, "<br />"); message.Body = text;
-Tom
Last edited by navyjax2; Nov 10th, 2008 at 5:06 pm.
![]() |
Similar Threads
- Capturing "Enter" key event in C# windows application (C#)
- reading a char from keyboard without pressing "Enter"??? (C)
- google "keyword" question (Search Engine Optimization)
- "enter" event (C#)
- why i have to press "enter" twice before getline can read the string... (C++)
Other Threads in the ASP.NET Forum
- Previous Thread: Final Project Ideas Require
- Next Thread: Repeater control on Mac PC
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax appliances asp asp.net beginner bottomasp.net box browser businesslogiclayer button c# c#gridviewcolumn cac checkbox class click compatible confirmationcodegeneration content contenttype control countryselector courier css database datagrid datagridview datalist deadlock deployment development dgv dialog dropdownmenu dynamic dynamically edit embeddingactivexcontrol fileuploader fill findcontrol flash flv forms gridview gudi homeedition iframe iis javascript jquery list menu mono mssql multistepregistration nameisnotdeclared novell objects opera order problem ratings redirect registration relationaldatabases reportemail rotatepage search security serializesmo.table sessionvariables silverlight smartcard smoobjects software sql ssl tracking treeview validatedate validation vb.net virtualdirectory vista visual-studio visualstudio vs2008 web webapplications webarchitecture webdevelopment wizard xml xsl






