Results 1 to 2 of 2
-
11-19-2010, 01:02 PM #1
- Join Date
- Apr 2008
- Location
- Boston, USA
- Posts
- 13,172
- Thanks
- 744
- Thanked 699 Times in 550 Posts
- Blog Entries
- 4
- Feedback Score
- 4 (100%)
Too many characters in character literal - Asp .Net with JavaScript
Too many characters in character literal - Asp .Net with JavaScript
When you try to build a javascript string in asp .net you might bump into this error. The common cause of this not escaping the characters that need to be escaped.
For example
StringBuilder sb=new StringBuilder();
sb.Append(@"<a href="JavaScript:Method('var');">Call method</a>");
When using Vervatim you still need to escape the double quotes using another double quote not with a backslash(\).
This should be the proper way of doing it.
sb.Append(@"<a href=""JavaScript:Method('var');"">Call method</a>");
There could be other case scenarios.Free Classified Ads & BUSINESS/PROFESSIONAL SOCIAL NETWORK
-
12-17-2010, 05:21 AM #2
Freshman
- Join Date
- Dec 2010
- Posts
- 43
- Thanks
- 0
- Thanked 0 Times in 0 Posts
- Feedback Score
- 0
The Most of the time users are facing the above mentioned exception when ever they are uploading data or some images into data base.Thanks for sharing information.
Similar Threads
-
HTML/XHTML Character Entities
By BrainPulse in forum HTML / DHTMLReplies: 7Last Post: 09-10-2010, 01:19 PM -
Can anyone suggest me the best ebook for character education?
By greenfin in forum General TalkReplies: 0Last Post: 06-23-2010, 08:04 AM -
Valid Characters in Url
By manik in forum Web Development - Programming & CodingReplies: 0Last Post: 06-08-2010, 03:14 PM -
Which character in the Cullen family do you like most?
By technohive in forum General TalkReplies: 7Last Post: 01-18-2010, 05:17 PM -
XHTML Character Entity Reference
By Amit.Verma in forum HTML / DHTMLReplies: 2Last Post: 08-07-2008, 09:15 PM


Reply With Quote

