Solved

Response.write does not write a string on web page

Posted on 2009-07-09
2
240 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

724 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