Sunday 28 June 2009

jQuery Intellisense in VS 2008



Here's the reference on how to have jQuery Intellisense in VS 2008 .
http://weblogs.asp.net/scottgu/archive/2008/11/21/jquery-intellisense-in-vs-2008.aspx

Easy 5 steps
  1. Go to jQuery site and download the current release and the "Documentation: Visual Studio" link.
  2. Download the patch from Microsoft to allow Intellense in Javascript. Microsoft Site
  3. Include jQuery to your web page as you normally do.
  4. Place the doc file at the place where you place your jquery.js and make sure the file name ends with -vsdoc.js.(Note, the doc file I downloaded was -vsdoc2.js, so I had to remove the "2" from file name.)
  5. Have fun!!

Tuesday 9 June 2009

InvalidOperationException: HtmlPage_NotEnabled

Add this in Page_Loaded
==========================
if (DesignerProperties.GetIsInDesignMode(this))
return;



To avoid this problem, be sure to check if you use HtmlPage class in Page_Loaded.


If inside Page_Loaded you call another functions, make sure they do not call HtmlPage class. Otherwise, use the if statement I provided above.


Reference:
http://www.andybeaulieu.com/Home/tabid/67/EntryID/158/Default.aspx