Incorrect "The keyword 'new' is required..." warning

Suppose you have a webcontrol on your aspx page. When you declare a protected field in your code-behind class with the same name as the webcontrol id, R# gives a warning in the aspx file pointing to that webcontrol and says that it hides the underlying field:

<asp:repeater id="rptTarget" Runat="server"> <--- warning is issued on this line
protected System.Web.UI.WebControls.Repeater rptTarget;

1 comment
Comment actions Permalink


Could you send us the whole ASP file (at least its directives) with the
code-behind for investigation?

Sergey V. Coox
JetBrains, Inc
"Develop with pleasure!"


Please sign in to leave a comment.