A few things that ASP.NET runtime supports while Visual Studio editor doesn’t

There are a few features that are supported by ASP.NET runtime, but are not supported by Visual Studio Web forms editor. Therefore you do can create pages that will run just fine, but VS will refuse to provide intellisense or validation. Here is a list of known limitations.

1. You must specify server language in the page directive. If you don’t specify it we assume VB. Specification in web.config is not currently supported. Specification of language in language attribute of a server script block is not supported either.

2. We do not support language aliases. Only primary names such as VB, C# and VJ# are supported. Therefore you won’t be able to open pages with <%@ page language=”cs” %> and get correct code intellisense. In fact, you will get validation error on the laguage name.

3. Editor requires well formed HTML with HTML and BODY elements. This is mostly for our design surface to work correctly and for you markup formatting to remain intact. We don’t allow you to switch to Design view when markup contains certain type of errors that may screw source code formatting preservation.

4. If you change language of the page, you will have to close and reopen the page. This is because for performance and code simplicity we only wire page to the language compiler at page load. Currently we are unable to reconnect page to a different compiler dynamically.

Why VS is so strict? We don’t want to dictate users how to write code, but because of the time and resources constraints we had to choose a subset of what runtime supported. I hope we didn’t cut too much. If you feel we must support more, MSDN Feedback Center is still open for your votes :-)


Comments (0)