Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NewLine Constant givin probs.

0 views
Skip to first unread message

Ricky

unread,
Jan 14, 2003, 3:45:16 AM1/14/03
to
Hi - I am writin dummy C# ASP.NET page and i get this
error.
---------------------------------------------------
Compiler Error Message: CS1010: Newline in constant
Source Error:

Line 38: if (bProceed)
Line 39: {
Line 40: string msg="<script>window.navigate
('frameset.htm')" + "</script>";
---------------------------------------------------
Following is Compiler Error

C:\Documents and Settings\Kavanjit_singh\My
Documents\Default.aspx(40,68): error CS1010: Newline in
constant
C:\Documents and Settings\Kavanjit_singh\My
Documents\Default.aspx(40,69): error CS1513: } expected
---------------------------------------------------

Line 40 is shown in red.

Any idea whats wrong?

I tried using @ for text verbatim but no use. If i use 2
forward slashes in line 40 - <//script> - it works file
but they both come on client side and script doesnt works.

So whats wrong?

Ricky.

Peter O'Reilly

unread,
Jan 14, 2003, 10:54:25 AM1/14/03
to

I have experienced this/similar problem before. My guess is that you cut
and paste the code from somewhere else which has some extra baggage (hidden
text) - in this case the new line character \n which is not appearing in the
Visual Studio editor. Best bet is to delete the text from the affected area
and retype it from scratch. It's just a statement of two of code, so this
should not be a big deal. Afterwards, your code should be compile error
free.
Hope this helps. Good luck
--
Peter O'Reilly


0 new messages