开发者

<%= autocompletes to <%@ Assembly= in Visual Studio

开发者_开发知识库Using Visual Studio 2008 with the asp.net MVC framework. In partial views, if I try typing "<%=" to print out some data from the model, it autocompletes the "<%" to "<%@ Assembly" (tagiing my "=" on the end). Very annoying and I'm nearly sure it didn't used to, but can't think what I could have done to cause it.

Any ideas anyone?


This is because the intellisense engine sees that you are not inside of a tag and is trying to help out with the normal stuff that goes outside of all tags, such as assembly registration.

The easiest way around this is to first add a div to your partial view and then put all other mark up in the div. After you are done, you can remove the div if needed.


Tool -> Options -> Text Editor -> HTML : Auto list members unchecked. But,it is not easy to use.


Mine has the same behavior. Ctrl+Z twice and then = will get you to the right spot.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜