Codex73
Codex73

Reputation: 5766

Insert a Line Break after text in TextBox ASP.NET

I need to add line break after the following in the textbox.

txtBody.Value = "Dear " & Trim(tblProperty(0).Item("Contact")) & ","

I've tried so far 'ControlChars.CrLf', ..., 'vbNewLine', 'vbCrLf', ... at the end.

Upvotes: 2

Views: 6132

Answers (2)

ASergan
ASergan

Reputation: 171

Set textbox property TextMode="MultiLine".

Then try this for example:

txtBody.Value = "Dear " & "\n" & "Dear".

Upvotes: 1

user164226
user164226

Reputation:

Try Environment.NewLine

Upvotes: 2

Related Questions