How to turn IntelliSense on in Visual Studio 2010?

前端 未结 6 2026
野性不改
野性不改 2021-01-06 02:01

I am trying to enable the intellisense for aspx file types. I checked auto list members in the texteditor options. Either checking hide advanced members or not makes no diff

6条回答
  •  我在风中等你
    2021-01-06 02:49

    I just had this happen to me and it took me four hours to figure it out, but I'm going to share the solution in the event that anyone else does something like this. It's actually pretty stupid, but just in case anyone else does this, I wanted to share it.

    If you use a master page that makes use of user controls (which mine does) and you try to "speed it up" by putting html/head/body tags in separate controls, you'll lose the ASP.net intellisense. Something like this (very simple, crude example):

    
    
    Some CSS/Javascript here
    
    
    
    

    The lack of head and html closing tags in this example will create build errors, which in turn will create HTML validation errors. For some bizarre reason, HTML Intellisense still works, but ASP.net Intellisense won't.

    In my case, it was a failed caching experiment. Wasn't overly smart on my part, and I'll admit that...but at least hopefully someone can learn from my mistake (or I can if I do it again, although I highly doubt I will).

提交回复
热议问题