Reputation: 8141
I've got trouble getting Intellisense to work in ASP.NET source view.
For example, I register the Telerik RadControls DLL with a tag prefix, as it says in the samples:
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
But when typing <telerik: no intellisense appears.
Also, after adding a couple of controls, they get highlighted with the error "Unrecognized tag prefix or device filter 'telerik'". This is pretty annoying and I can't seem to find a solution.
Btw, the webpage itself works - its just the Intellisense that doesn't.
Upvotes: 1
Views: 2789
Reputation: 3891
Just fixed this myself for VS2008 (for aspx/ascx and codebehind) by adding the Telerik .dlls to the GAC on my local development machine.
I've had this issue before and both times it occurred was when my project was hosted on a network drive, where the project's path would be something like: *\\networkmachinename\c$\inetpub\projectname*
The fix:
On your local machine, go to Start > Programs > Microsoft Visual Studio 2008 > Visual Studio Tools > Visual Studio 2008 Command Prompt (run as admin)
Using the gacutil tool and the following commands (or more depending on how many .dlls you wish to use), add the assemblies to your GAC:
gacutil.exe -i "C:\Program Files (x86)\Telerik\RadControls for ASPNET AJAX Q2 2008\Bin35\Telerik.Web.UI.dll"
gacutil.exe -i "C:\Program Files (x86)\Telerik\RadControls for ASPNET AJAX Q2 2008\Bin35\Telerik.Charting.dll"
Obviously modify the dirs as appropriate for your OS/Telerik/Framework versions, then close Visual Studio 2008 Command Prompt, close VS2008 (if open) and restart VS2008 again.
You'll find the intellisense works on the aspx/ascx files first, and given a few minutes it'll work on your codebehind files too. Close and retry if it still doesn't work.
One other note, if you have a small error somewhere in your website's root web.config file, you'll also lose intellisense for Telerik (and perhaps other) controls - so check your web.config files aren't erroneous first.
Upvotes: 0
Reputation: 2029
I noticed a general problem with intellisense in VS2008 (with SP1). As they started supporting JS intellisense a lot of things became slower - or not working sometimes.
I know the describe problem - not only with telerik controls, I also know it from other (and my own) control libraries. Most of the time a rebuild - close of all pages, and restart of VS solves the problems for me.
My special problem (I guess it matters) is that I use a German release of VS2008. But also other things rule (from my experiences): The size of the project (somewhere above 50 pages things become worse). The time I had to kill an app while debuging :) General the time (in a session) I work on a project.
A last tip (which may help) I feel less problems when I add a ref to the controls directly in web.config. Additionally it frees me from havin the register directive on every page.
It looks like this:
<controls>
<add assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagPrefix="telerik" />
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions,
HTH
Manfred
Upvotes: 0
Reputation: 30661
Intellisense may fail for various reasons so I am going to ask you a few questions:
Upvotes: 1
Reputation: 4836
ctrl + space is a shortcut to trigger it ...
probably won't help but at least you will know that the problem is probably with intellisense not being able to find its data.
do you get intellisense for other classes still?
Upvotes: 0
Reputation: 11574
Does your entire project compile? Intellisense often breaks if there are compile errors elsewhere (even compile errors in other pages).
Upvotes: 0