VStudio 2010 - ASP.NET - 我在各种标签(标记)中丢失了 Intellisense
我在以下代码行中没有得到智能感知(请参阅 MyStore.CustomerID):
<asp:TextBox ID="TB1" runat="server" Text="<%# MyStore.CustomerID %>" />
<asp:TextBox ID="TB1" runat="server" Text='<%# MyStore.CustomerID %>' />
<a href="<%# MyStore.CustID %>"></a>
但是,我确实在这里得到了它:
<asp:TextBox ID="TB1" runat="server" Text="blank" />
<%# MyStore.CustomerID %>
如何在这些代码中打开智能感知其他标签?
我真的很想在标记内设置各种控件的文本/值,以清理代码隐藏中的空间。
注意
I get no intellisense in the following lines of code (see MyStore.CustomerID):
<asp:TextBox ID="TB1" runat="server" Text="<%# MyStore.CustomerID %>" />
<asp:TextBox ID="TB1" runat="server" Text='<%# MyStore.CustomerID %>' />
<a href="<%# MyStore.CustID %>"></a>
But, I do get it here:
<asp:TextBox ID="TB1" runat="server" Text="blank" />
<%# MyStore.CustomerID %>
How do I turn on intellisense within these other tags?
I really would like to set text/value of various controls from within the markup to clear up space in the code-behind.
Note
Not the same issue as ASP.NET Markup Intellisense not working in Visual Studio 2010
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,这对我来说也是一个案例。当您使用代码块 (<%:...%>) 时,当它们与任何其他 HTML 属性分开时,您将获得智能感知。但是当您在 HTML 属性内使用它们时,您将无法获得智能感知。
所以你并没有失去它,它根本就不存在。
这是一个引述;
也可以看看这个;
http://connect.microsoft.com/VisualStudio/feedback/details/617937/intellisense-uses-wrong-context-on-c-nuggets-in-asp-net-mvc2-views
yes, this is a case also for me. When you are working with code nuggets (<%:...%>), you get intellisense when they are separate from any other HTML attributes. but when you work with them inside a HTML attribute, you get no intellisense.
So you didn't lose it, it hasn't been there at all.
here is a quote;
see this one as well;
http://connect.microsoft.com/VisualStudio/feedback/details/617937/intellisense-uses-wrong-context-on-c-nuggets-in-asp-net-mvc2-views