CS1010: Newline in Constant" Error Message - fixed 
CS1010: Newline in Constant" Error Message

I got this error from asp.net application and here is the solution

Modify string as like

string strValue = "Test value";
string strAll = "<SCRIPT lanquage='JScript'>window.alert('" + strValue + "');<"+"/SCRIPT>";
More..
http://support.microsoft.com/default.as ... -US;827420

"This behavior is by design"

Why??

because the compiler things that the </SCRIPT> in strAll is the closing tag for the <script runat="server">
=========
<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
string strValue = "Test value";
string strAll = "<SCRIPT lanquage='JScript'>window.alert('" + strValue + "');</SCRIPT>";

http://weblogs.asp.net/sbehera/archive/ ... 27228.aspx

[ add comment ]   |  permalink  |  related link  |   ( 2.9 / 29 )

| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |