 |
| .NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the .NET Web Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

March 4th, 2010, 02:07 PM
|
|
Authorized User
|
|
Join Date: Feb 2008
Posts: 89
Thanks: 13
Thanked 0 Times in 0 Posts
|
|
Code:
Response.Write(@"document.writeln(""<html><head></head><body>Hi msman88</body></html>""); ");
On the above I got only the following is printed on the browser:
Code:
document.writeln("Hi msman88");
I want to print it as string as it appears below:
Code:
document.writeln("<html><head></head><body>Hi msman88</body></html>");
So, edit the code to do that.
Last edited by msman88; March 4th, 2010 at 02:11 PM..
|
|

March 4th, 2010, 03:08 PM
|
|
Authorized User
|
|
Join Date: Feb 2008
Posts: 89
Thanks: 13
Thanked 0 Times in 0 Posts
|
|
Hey! I got it, here it is:
Code:
Response.Write(HttpUtility.HtmlEncode("<html><body>hello msman88</body></html>"));
that will print:
Code:
<html><body>hello msman88</body></html>
|
|

March 5th, 2010, 12:50 PM
|
|
Authorized User
|
|
Join Date: Feb 2008
Posts: 89
Thanks: 13
Thanked 0 Times in 0 Posts
|
|
 Hey where are you wrox Professionals!
|
|

March 5th, 2010, 01:15 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
Please don't post these kind of messages. The best answer you'll ever get is "I am here". They only clutter up the forum. Like Sam said: we do this stuff for fun in our own *free* time. That means if i find your post interesting enough and know the answer, I'l look at it; otherwise I won't.
You're not making it easier for yourself by posting many unrelated messages in the same thread. Other people will see "40 replies", think the thread is already taking care of and move on. So, stick to a simple rule: "new topic == new thread". Choose an apprpriate forum and a descriptive title and post a detailed message.
That way you increase your chances of a reply, minimizing the need to post these kind of useless "where are you" messages.
Hope this helps,
Imar
|
|

March 5th, 2010, 01:51 PM
|
|
Authorized User
|
|
Join Date: Feb 2008
Posts: 89
Thanks: 13
Thanked 0 Times in 0 Posts
|
|
I'm sorry, But the problem is not understood except you run it.
For more care on that, I developed a new app is particularly describing this problem only.
To facilitate understanding the problem by members.
However, I opened a new thread for that again in, and you should solve it.
and tell me if it's in the right place. Problem with "HttpUtility.HtmlEncode()"
Last edited by msman88; March 5th, 2010 at 01:54 PM..
|
|

March 14th, 2010, 01:58 PM
|
|
Friend of Wrox
|
|
Join Date: Dec 2008
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
|
|
It's great that you figured out the answer yourself! Comparing this to the issue you had in the other thread (the HtmlEncode thread), the difference is that, here you encoded html - that's necessary, but in the other thread you encoded javascript - that only causes trouble.
Hope this clears the difference between the two situations.
|
|

March 14th, 2010, 03:03 PM
|
|
Authorized User
|
|
Join Date: Feb 2008
Posts: 89
Thanks: 13
Thanked 0 Times in 0 Posts
|
|
Quote:
Originally Posted by PeterPeiGuo
It's great that you figured out the answer yourself! Comparing this to the issue you had in the other thread (the HtmlEncode thread), the difference is that, here you encoded html - that's necessary, but in the other thread you encoded javascript - that only causes trouble.
Hope this clears the difference between the two situations.
|
I switched to the another thread because the topic became not related with this topic title.
|
|
 |