Blog Home  Home RSS 2.0 Atom 1.0 CDF  
The Efficient Coder - AJAX
There has got to be a better way of communicating with our computers!
 
 Saturday, November 22, 2008

OK - maybe everyone else knows this, but after about a year of getting so-so support for intellisense in Javascript I downloaded the latest hotfix and hoped that this would fix it...it did not.  Since I have a very unhealthy addiction to Intellisense I figured out it was time to do a little troubleshooting and get this to work.  When adding the the script tags to my page to get intellisense, my Error List now contained the message:

Error updatign JScript IntelliSense: [SOMEPATH]\Temporary Internet Files\Content.IE5\[XXXX]\[XXX].js 'jQuery' is undefiend @ 9.1

So I figured if I could make this error go away chance are pretty good IntelliSense would start working again.  What I found is if you use the absolute path /FOO/FEE.JS in your script tag you get this error message.  If you don't and use a relative path ../FOO/FEE.JS all is well.

One other thing I found while searching the web (sorry I forgot the site so I can't give the person credit) is to get your Intellisense to work when using Masterpages

This allows for the design time to pickup the script file, but at run time the file won't be duplicated, especially since my JS files stored as a resource in.  I have my JS files compiled as an embedded resource and for some reason, adding those embedded resources to the ScriptManager, Scripts sections doesn't allow IntelliSense to add the files as you would expect.  Maybe in another year I'll get around to troubleshooting that, time to get some work done!

-ec

11/22/2008 10:07:43 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]   AJAX | ASP.NET | JScript  |  Trackback
 Thursday, June 12, 2008

I've built some ASMX web services (yes these should be converted to WCF, but they work for now).  I'm starting to use these as Script Services for some ASP.NET Ajax Enabled pages.  I ran into a problem where some of the "stuff" I didn't want to have happen in some properties on the objects returned by the server were getting executed even though they were marked as [XmlIgnore()] which disables them for SOAP tASMX type web calls.  Apparently when the returned objects get serialized as JSON for a script service, they ignore the [XmlIgnore()] tag, which I guess makes sense but is rather inconvenient, in that I need to go back and do a manual search & change.  Within the using System.Web.Script.Serialization namespace there is another attribute you can decorate your properties with called [ScriptIgnore()] that seems to do the trick.

-ec

6/12/2008 10:07:58 AM (Eastern Standard Time, UTC-05:00)  #    Comments [1]   ASP.NET | WCF | AJAX  |  Trackback
Copyright © 2010 Kevin D. Wolf. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: