"CS1010: Newline in Constant" Error Message When a String Contains a Tag in the Inline Code

While working in ASP.Net and Java-script, we often use strings or string builder objects to register client script into the page. And when it comes to writing  </script> tag,  ASP.Net throws “CS1010: Newline in Constant” Error. The workaround for this problem is split the </SCRIPT> tag in to two strings, such as “<” + “/script>”.

The same can be found from MSDN support center (url : http://support.microsoft.com/kb/827420)

No related content found.

This entry was posted in .Net. Bookmark the permalink.

2 Responses to "CS1010: Newline in Constant" Error Message When a String Contains a Tag in the Inline Code

  1. santosh Maurya says:

    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: CS1010: Newline in constant

    Source Error:

    Line 12:
    Line 13:
    Line 14: ‘****************************************************************************
    Line 15: ‘ WO :- IRM_RemoveSSn
    Line 16: ‘Created By :- Harshwordhan gupta

    Source File: c:\Inetpub\wwwroot\SearchCandidate.aspx Line: 14

    I dont know what is problem.
    On other computer same page is running very well but on my computer not?

Leave a Reply

Your email address will not be published. Required fields are marked *

*


*

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>