We have ascx user controls written in VB.NET for an ASP.NET 4.0 project. The built-in VS page validator always displays the message from the question for all custom properties of our user control.
For instance, here is the beginning of the code of one of our controls:
<%@ Control Language="VB" ClassName="PicView" %>
<%@ Import Namespace="System.Drawing" %>
<script runat="server">
Public ImageUrl As String
When we try to use this control using code like this
<%@ Register TagPrefix="foo" TagName="PicView" src="~/ascx/PicView.ascx" %>
<foo:PicView ImageUrl="screenshots/image.gif" runat="server" />
, the "Error List" pane displays this message:
Attribute 'ImageUrl' is not a valid attribute of element 'PicView'
The property works fine in compiled aspx pages, but how to get rid of this in the VS IDE? And enable IntelliSense for such properties if it's possible?