Vivek Thakur

Chaotically Complex

  Home  |   Contact  |   Syndication    |   Login
  102 Posts | 1 Stories | 294 Comments | 66 Trackbacks

News



Archives

ASP.NET Ventures

Wednesday, January 23, 2008 #

A junior developer in our recent project got stuck in this issue: he had to call Javascript code from VB.NET  code behind and insert this value in a function: Jammin' Hard.

Now the single quote (apostrophe ') was creating trouble, giving an error as JS string got terminated. A simple solution in such cases is to use HTML codes for apostrophe, which is : '
So the string should be passed as: Jammin' Hard

This solved his issue. See this table for more codes: http://www.netlingo.com/tags.cfm