开发者

VStudio 2010 - ASP.NET - I lose Intellisense within various tags (markup)

开发者 https://www.devze.com 2023-03-07 05:13 出处:网络
I get no intellisense in the following lines of code (see MyStore.CustomerID): <asp:TextBox ID=\"TB1\" runat=\"server\" Text=\"<%# 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


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;

Unforunately code IntelliSense is not supported in code nuggets that are within HTML attributes in Web Forms files. This is supported in Razor (CSHTML) files however.

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

0

精彩评论

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