Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
.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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #31 (permalink)  
Old March 4th, 2010, 01:07 PM
Authorized User
Points: 437, Level: 7
Points: 437, Level: 7 Points: 437, Level: 7 Points: 437, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2008
Location: Tareem, Hadramout, Yemen.
Posts: 89
Thanks: 13
Thanked 0 Times in 0 Posts
Default

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 01:11 PM.
Reply With Quote
  #32 (permalink)  
Old March 4th, 2010, 02:08 PM
Authorized User
Points: 437, Level: 7
Points: 437, Level: 7 Points: 437, Level: 7 Points: 437, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2008
Location: Tareem, Hadramout, Yemen.
Posts: 89
Thanks: 13
Thanked 0 Times in 0 Posts
Default

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>
Reply With Quote
  #33 (permalink)  
Old March 5th, 2010, 11:50 AM
Authorized User
Points: 437, Level: 7
Points: 437, Level: 7 Points: 437, Level: 7 Points: 437, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2008
Location: Tareem, Hadramout, Yemen.
Posts: 89
Thanks: 13
Thanked 0 Times in 0 Posts
Default

Hey where are you wrox Professionals!
Reply With Quote
  #34 (permalink)  
Old March 5th, 2010, 12:15 PM
Imar's Avatar
Wrox Author
Points: 67,023, Level: 100
Points: 67,023, Level: 100 Points: 67,023, Level: 100 Points: 67,023, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,185
Thanks: 65
Thanked 1,403 Times in 1,383 Posts
Default

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
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #35 (permalink)  
Old March 5th, 2010, 12:51 PM
Authorized User
Points: 437, Level: 7
Points: 437, Level: 7 Points: 437, Level: 7 Points: 437, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2008
Location: Tareem, Hadramout, Yemen.
Posts: 89
Thanks: 13
Thanked 0 Times in 0 Posts
Default

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 12:54 PM.
Reply With Quote
  #36 (permalink)  
Old March 14th, 2010, 01:58 PM
Friend of Wrox
 
Join Date: Dec 2008
Location: , , .
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
Default

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.
Reply With Quote
  #37 (permalink)  
Old March 14th, 2010, 03:03 PM
Authorized User
Points: 437, Level: 7
Points: 437, Level: 7 Points: 437, Level: 7 Points: 437, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2008
Location: Tareem, Hadramout, Yemen.
Posts: 89
Thanks: 13
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by PeterPeiGuo View Post
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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
he conversion of a char data type to a datetime data type resulted in an out-of-range adamhw Classic ASP Basics 3 December 23rd, 2009 06:18 AM
Method must have a return type Mr.Rendezvous BOOK: Beginning C# 3.0 : An Introduction to Object Oriented Programming ISBN: 978-0-470-26129-3 2 November 25th, 2009 04:21 PM
return type as Form neriam Beginning VB 6 1 August 9th, 2009 02:25 AM
Generic return type mega C# 2005 1 November 30th, 2006 06:27 AM
return type? Sibananda Tripathy J2EE 1 January 3rd, 2005 03:03 AM



All times are GMT -4. The time now is 02:18 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.