[237] 'Cannot resolve symbol' errors in Web User Controls in ASP.NET 2.0

I have submitted a sample solution for this to the tracker.

In a VS2005/ASP 2.0 project: when accessing a public property on a Web
User Control from a Web Form, the property is highlighted in red by R#
with the error message 'Cannot resolve symbol x', e.g.

In default.aspx:

Resharper Test


and it's code-behind file, default.aspx.cs: using System; using System.Web.UI; public partial class _Default : Page { protected void Page_Load(object sender, EventArgs e) {} protected void btnClickMe_Click(object sender, EventArgs e) { Response.Write(testForm.TestControl); // ERROR HERE } } and then in TestForm.ascx
]]>

and it's code-behind file, TestForm.ascx.cs:

using System;
using System.Web.UI;

public partial class TestForm : UserControl
{
protected void Page_Load(object sender, EventArgs e) {}

public string TestControl
{
get { return txtTestControl.Text; }
}
}

--
Steven Wood

2 comments
Comment actions Permalink

Steven,

>I have submitted a sample solution for this to the tracker.
Thanks a lot, I'll check it ASAP.

--
Sergey V. Coox
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

I've been having the exact same problem. No intellisense either, clearly
due to the fact that the UserControl's class members are not recognized.

Hello Sergey,

Steven,

>> I have submitted a sample solution for this to the tracker.
>>

Thanks a lot, I'll check it ASAP.



0

Please sign in to leave a comment.