开发者

ASP controls in the aspx page "do not exist" in code behind - VS10

This is kind of my last ditch shot at this as no one else in the office (who was willing to try) can figure it out. I have seen a couple of other threads about this and attempted suggestions found in them but nothing seems to work.

My Problem: I have controls on my aspx page that generate errors like "The name 'Blah' does not exist in the current context"

Relevant

  • The controls are declared similar to the following

<asp:TextBox ID="txtSenderID" runat="server" />

  • the controls are declared in the aspx.designer.cs file

protected global::System.Web.UI.WebControls.TextBox txtSenderID;

  • Everything in the <%@ Page ... %> appears to be in order (verified by coworker)
  • I am getting a runtime error on and off again with a third party library (not used开发者_JAVA技巧 by this page), but even when that error is gone I still have the same problem with my controls not being recognized in the code behind. When I remove this page from the project all together the error still comes and goes, but the website runs when that error is gone.

I have tried deleting and regenerating the aspx.designer.cs file compiling various ways. No one else in our office, working on similar computers formatted with the same image, is having this problem and I am getting down to my wit's end.


There could be several reasons why your controls is not recognized on code behind. Please post the aspx and aspx.cs sample codes so we can take closer look.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜