Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics 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 November 20th, 2006, 10:32 AM
Registered User
 
Join Date: Nov 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Entering special characters on the form

I have a classic ASP page and I have an input field where users can enter a Title of a speech and the information is saved to the database and then i need to display this information in the same input field when the user re-opens the speech record. I was having problems displaying quotes and special characters but i'm now able to do this using:
<CODE>
     <INPUT.... VALUE="<%Server.HTMLEncode(varSpeechName)%>"
</CODE>
However, when testing i notice this: I am to enter the characters: <>
and i'm able to save these to the database but when i display these chars in the input field it must be thinking its html tags and it shows some HTML/javascript in the cell where i have a button for that record on the page. It shows:
<CODE DISPLAYED>
   )){this.form.submit()}else{return false}" align="top">
</CODE DISPLAYED>
how do i get around this? Thanks
 
Old November 21st, 2006, 09:27 AM
Friend of Wrox
 
Join Date: Oct 2006
Posts: 114
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You will need to swap them out so that < become &lt; and > becomes &gt; otherwise data entered into the code will mess up your pages.

For example, someone could enter </TABLE> into a field.

Regards,

Sean Anderson





Similar Threads
Thread Thread Starter Forum Replies Last Post
querystring and special characters tulincim Classic ASP Basics 4 October 4th, 2005 06:05 PM
storing special special characters in nvarchar... ACE2084 SQL Server 2000 2 February 9th, 2005 11:45 AM
SPECIAL characters... IIF MER78 BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 1 December 23rd, 2004 05:32 PM
special characters lian_a Classic ASP Basics 3 June 23rd, 2004 05:16 AM





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