Solved

Response.write does not write a string on web page

Posted on 2009-07-09
2
237 Views
Last Modified: 2012-08-13
I got an error msg while doing a process on my website.

and i want to present that error msg to the user.

i am giving the whole error msg below.

when i am doing response.write then i am not getting the error msg string on the page.
any one could help me out here
this is the actual error msg
 
\"\0\" is an unexpected token. The expected token is \">\". Line 34176, position 29
 
 
 
and i am trying to do 
 
string r = "ErrorMsg = '\"\0\" is an unexpected token. The expected token is \">\". Line 34176, position 29.'";
 
 
        Response.Write(r);
 
and i am getting this as the output
 
ErrorMsg = '"

Open in new window

0
Comment
Question by:ziorrinfotech
2 Comments
 
LVL 3

Assisted Solution

by:Joep_Killaars
Joep_Killaars earned 20 total points
ID: 24820906
I get this as the message when I execute your code :

ErrorMsg = '"" is an unexpected token. The expected token is ">". Line 34176, position 29.'

The one thing I can think of is that \0 is being recognized as an 'End of string' character.  What is the textual output you want to write ? Why do you have \0 in your error string ?
0
 
LVL 39

Accepted Solution

by:
Pratima Pharande earned 30 total points
ID: 24820950
try this

  string r = @"ErrorMsg = \""\0\"" is an unexpected token. The expected token is \"">\"". Line 34176, position 29";


            Response.Write(r);
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question