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

Line Break in an Error message

347 100+
I have the following lines of code in my codebehind and want to insert a line break, I just don't know how to do this.


Expand|Select|Wrap|Line Numbers
  1. Checking if the file upload control contains a file
  2.         If Not File1.PostedFile Is Nothing And File1.PostedFile.ContentLength > 0 Then
  3.             Try
  4.                 'checking if it was .txt file BEFORE UPLOADING IT!
  5.                 'You used to upload it first...but the file could be a virus
  6.                 If File1.FileName = ("doug.csv") = False Then
  7.                     'The file is not the expected type...do not upload it
  8.                     'just post the validation message
  9.                     message.Text = "Sorry, thats not the correct file. HERE is where I'd like the line break Please locate and upload 'doug.csv'"
  10.                 Else
  11.                     'The file is a .txt file
  12.                     'checking to see if the file exists already
  13.                     'If it does exist Deleting the existing one so that the new one can be created
  14.                     If IO.File.Exists(SavePath) Then
  15.                         IO.File.Delete(SavePath)
  16.                     End If
  17.  
I know that in VB its [space]_[space] to do carriage returns in coding, but I'm sure it's different with asp.net
Jun 28 '10 #1

✓ answered by ThatThatGuy

@dougancil
Concanate vbNewLine in you message

2 3096
ThatThatGuy
449 Expert 256MB
@dougancil
Concanate vbNewLine in you message
Jun 29 '10 #2
Frinavale
9,735 Expert Mod 8TB
As ThatThatGuy suggested you need to append the VB new line. You can do this using VBLF or Environment.NewLine
:)

-Frinny
Jun 29 '10 #3

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

Similar topics

2
by: Hong | last post by:
Hi, I am trying to create a switch but I do not know why I am geting an error message, can someone tell me what is wrong, Error Message; Warning: Unexpected character in input: '\'...
1
by: Matt | last post by:
What is the syntax for line break character in javascript?? For example, the following code will yield error " unterminated string constant." If I put the following in one line, then no error. ...
6
by: Nurchi BECHED | last post by:
Hello, All! I have created an application with a multiline textbox on the form. When I press a button, it has to show something and then break the line and show something else. I tried "\n",...
10
by: Jim H | last post by:
I sometimes get the following error from my Form's Dispose Method when the application is closing: ------------------------------------------------- An unhandled exception of type...
6
by: Adam Knight | last post by:
Hi all, I am sending email via ASP.NET. In the message i am wanting to insert a linebreak after an initial salutation. In asp I would simply use vbCrLf. objEmail.Body = "Dear " & Rw("name")...
4
by: neil brown | last post by:
Whenever I try and run a project in VB.NET 2003, all i get is: "An unhandled exception of type 'System.ArgumentException' occurred in Unknown Module. Additional information: The parameter is...
8
by: g_man | last post by:
I am trying trap Runtime error 3022 (duplicates) in the click event of a command button that closes the form. I have code in the Form_Error event that does a good job of providing a more meaningful...
6
by: kimiraikkonen | last post by:
Hi, I want to save all the item content of a listbox line by line into a simple text file then recall them when my project is opened. For example listbox1 contains: That - item1 Group ...
4
by: deerchao | last post by:
Hi, I'd like to render colorful text with word wrap on screen (kind of inline <fonttag to change text color in html), but run into the line break problem. Graphics provides several DrawString...
3
by: sreemathy2000 | last post by:
I need to display a message box in my windows application.. the text for the message is read from app.config. i need to put a line break in the message box. i tried to put \n in the text that...
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...
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...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.