Visual Studio Orcas JavaScript IntelliSense

Posted by: Ajax.NET Professional, on 28 Apr 2007 | View original | Bookmarked: 0 time(s)

Bertrand has a great post about JavaScript IntelliSense with the next Visual Studio .NET code-name Orcas. I downloaded the bits to give it a try. Oh yes, it is working great when creating ASP.NET AJAX Web applications.

 

What about Web developers not using ScriptManager?

Hm, next I tried to run my AjaxPro library and add some JavaScript IntelliSense for next Visual Studio .NET. I tried several ways to include the on-the-fly generated JavaScript files, but I couldn't find any that would work. Only generating of theses files and including them as static JavaScript files was working.

I contacted Bertrand and the ASP.NET team to find a solution, but there is no real way to add generated JavaScript files during development.

The way JavaScript IntelliSense is working is to include eithere a <reference/> tag in the top of static JavaScript files or include them with the ScriptManager. But how can I include JavaScript files with the ScriptManager object if I don't want to use the automatic added ASP.NET AJAX JavaScript core scripts? Currently there is no way to disable core ASP.NET AJAX scripts. I'm still in hope that they will add this simple property to the ScriptManager, but Bertrand already told me that it is very late to be included in Orcas.

One way to workaround this and use the ScriptManager without adding the core ASP.NET AJAX scripts could be this:

protected override void OnPreInit(EventArgs e) {
   form1.Controls.Remove(ScriptManager1);

   // add now all your JavaScript files again
   // this.ClientScript.RegisterClientScript(...);

   base.OnPreInit(e);
}

This will enable JavaScript IntelliSense without using the ScriptManager.

 

Where do I see problems?

The main problem I see is with the JavaScript IntelliSense is that it will only work if running ASP.NET AJAX applications. But what about using this without? What is if you want to use any other popular JavaScript framework? Because JavaScript IntelliSense includes (<reference/> tag) are only working in static JavaScript files it is not easy possible to have IntelliSense available for other frameworks.

Maybe I didn't see all ways to include external files, but if I need to use the ASP.NET AJAX ScriptManager I cannot develop Web applications that are working on mobile devices because not all JavaScript inside the core script files are working on older Web browsers or i.e. Windows Mobile. If you have any idea or solution feel free to add a comment below.

Category: JavaScript | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 1307 | Hits: 72

Similar Posts

  • "ADO.NET Entity data model" or "edmx" or "L2E" debug visualizer more
  • Debugger Visualizers not working in ASP.NET Medium Trust more
  • Multi-Targeting Support (VS 2010 and .NET 4 Series) more
  • jQuery Intellisense in VS 2008 more
  • jQuery and Microsoft more
  • Visual Studio Tips & Tricks more
  • VS2008 and .NET 3.5 Service Pack 1 Beta now available more
  • Visual Studio's JavaScript Editor Really needs a Function/Class Viewer! more
  • LINQPad as a Code Snippet Execution Engine more
  • VE JavaScript Intellisense Helper bug & workaround more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD