Wrox Programmer Forums
|
BOOK: ASP.NET Website Programming Problem-Design-Solution
This is the forum to discuss the Wrox book ASP.NET Website Programming: Problem - Design - Solution, Visual Basic .NET Edition by Marco Bellinaso, Kevin Hoffman; ISBN: 9780764543869
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET Website Programming Problem-Design-Solution 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 July 28th, 2004, 02:09 AM
Authorized User
 
Join Date: Apr 2004
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default Escape sequences for HTML

signing up for fax services for my asp application, the function prototype is:
SendFaxResult = obj.SendCharFax("username","password",+"1 281 999 9999",stringmessage, "HTML") ;

so i need to format the stringmessage in html. My problem is There are just TOO MANY escape sequences required. Any suggestions on how i can avoid doing this manually. I aready tried putting @ infront of the string but it didnt work (probably because the html contains loads of quotes)
keep in mind that i will need to plug in variables like so

stringmessage= "<p> Name: " + name + "</p>";

rrr
__________________
rrr
 
Old July 28th, 2004, 07:02 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

I don't know if you can get around it. By the way, creating a large string, you will get better performance using the System.Text.StringBuilder class.

Brian
 
Old July 28th, 2004, 08:54 AM
Authorized User
 
Join Date: Mar 2004
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am not to sure if this is what you mean, but if you mean that you want to convert all your HTML to the appropriate escape characters i think you can just pass the string though the server.HTMLEncode(string) function.

Also, Brian is right regarding the stringBuilder class!

Rob






Similar Threads
Thread Thread Starter Forum Replies Last Post
javascript in CDATA doesnt escape html eruditionist XSLT 5 September 17th, 2008 01:07 PM
sequences Chacko C++ Programming 2 January 29th, 2007 08:27 AM
Does MS-Access 2003 support Sequences ramuis78 Access 0 July 5th, 2006 10:51 AM
creating finate sequences ajm235 C++ Programming 13 October 6th, 2004 03:30 PM
record sequences isheikh SQL Server 2000 2 April 9th, 2004 01:16 PM





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