Reputation: 952
I have a user control that inherits from another user control like so:
public partial class UserControlBase
{
protected Vehicle _vehicle { get; private set; }
}
public partial class SpecificUserControl : UserControlBase
{
// Vehicle is visible and accessible here... DUH.
}
However, when I try to databind vehicle properties inside inline code blocks, I get error: _vehicle doesn't exist in this context.
SpecificUserControl.ascx
<span><%# _vehicle.Brand %></span>
What am I doing wrong? Is it even possible?
Upvotes: 0
Views: 53
Reputation: 952
The culprit was Visual Studio, 2013 in my case, glitch. Once restarted, everything worked smoothly.
Upvotes: 1