Wrox Programmer Forums
|
C# 2008 aka C# 3.0 Discuss the Visual C# 2008 (aka C# 3.0) language
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2008 aka C# 3.0 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
 
Old March 3rd, 2010, 02:06 PM
Authorized User
 
Join Date: Feb 2008
Posts: 89
Thanks: 13
Thanked 0 Times in 0 Posts
Exclamation Concatenation

<p>
I have error in orinting (\):
Response.Write("Name\ Mohammed");
</p>
 
Old March 3rd, 2010, 03:23 PM
Friend of Wrox
 
Join Date: Dec 2008
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
Default

If you are trying to show \, use \\, like this Response.Write("Name\\ Mohammed");
The Following User Says Thank You to PeterPeiGuo For This Useful Post:
msman88 (March 4th, 2010)
 
Old March 4th, 2010, 05:39 AM
Authorized User
 
Join Date: Feb 2008
Posts: 89
Thanks: 13
Thanked 0 Times in 0 Posts
Default

how can i thank you Mr. ?
 
Old March 4th, 2010, 08:06 AM
Authorized User
 
Join Date: Feb 2008
Posts: 89
Thanks: 13
Thanked 0 Times in 0 Posts
Exclamation using @ in response.write("");

I want to print the following:
document.writeln("<html><body>Hi msman88</body></html>”);


But I have error when coding it like this:
Response.write(@” document.writeln(\"<html><body>Hi msman88</body></html>\”); ”);
 
Old March 4th, 2010, 08:13 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Please at least attempt to answer these questions yourself before posting. Searching google, or the MSDN documents is the minimum you should do.

http://msdn.microsoft.com/en-us/libr...8VS.71%29.aspx
__________________
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?
 
Old March 4th, 2010, 10:57 AM
Friend of Wrox
 
Join Date: Dec 2008
Posts: 238
Thanks: 2
Thanked 20 Times in 19 Posts
Default

Use "" to escape " within a verbatim string literal:
Code:
Response.write(@” document.writeln(\"<html><body>Hi msman88</body></html>\”); ”);





Similar Threads
Thread Thread Starter Forum Replies Last Post
Concatenation in DropDownList sw02 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 August 10th, 2009 10:30 AM
Aggregate Concatenation 12th_Man SQL Language 4 January 10th, 2006 03:26 PM
Concatenation of fields JpJoe Access 8 April 8th, 2005 01:32 AM
string concatenation nulogix PHP How-To 1 June 24th, 2004 06:17 AM
string concatenation matt_99 Access VBA 2 January 17th, 2004 09:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.