We help IT Professionals succeed at work.

ASP.Net VB define block of text

brasso_42
brasso_42 asked
on
Hi

Is there any way in an ASP.net VB application to define a block of text that can go over multiple lines without using underscores?

e.g.

dim this as string
this = "Hello My
Name is fred"

dim NotThis as string
NotThis = "Hello My " _
& "Name is fred"


Thanks
Comment
Watch Question

Big MontyWeb Ninja at large

Commented:
no, not really. the only alternative would be to assign the value to the variable each line:

dim this as string
this = "Hello My"
this += "Name is fred"

why don't you want to use the underscore?

Author

Commented:
Because when putting in SQL script that spans over 20-30 lines its messy

Putting it on 1 line makes it hard to read when debugging
Web Ninja at large
Commented:
well unfortunately you can't do what you're asking. you could put the sql script into a stored procedure or view, that way you could format it however you like

Author

Commented:
ok thanks