New ASP control not accessible in code behind
Posted on 2006-11-29
Sometimes when I add a new control in ASP it isn't accessible in the codebehind until I completely exit the website and reopen it in Visual Studio 2005.
Here's the latest one:
<asp:ListBox ID="lbStatus" Height="85px" Width="410px" AutoPostBack="false" CausesValidation="false" runat="server" Visible="true"></asp:ListBox>
It is not available in the list of objects in codebehind. And when I do "Me.lbStatus" it says it's not a member of my form.
I saved, did a Refresh from the Solution explorer, did a right-click -> refresh on the project name. Nothing works. What's up with this?