Reputation: 299
Compiler Error Message: CS1061: 'ASP.admin_users_aspx' does not contain a definition for 'Form1' and no extension method 'Form1' accepting a first argument of type 'ASP.admin_users_aspx' could be found (are you missing a using directive or an assembly reference?)
Line 317: #line default
Line 318: #line hidden
Line 319: this.Form1 = @__ctrl;
Line 320:
Line 321: #line 168 "C:\Users\SIMiP1\Desktop\BON\CellularOrders.Presentation.Web\Admin\Users.aspx"
I don't understand this error and what might be the reason for this error Please tell me what do you understand from this error msg and what CODE I would need to post here - cause the users.aspx file is long and has 222lines
this is line 168:
<form id="Form1" runat="server">
<CellularOrders:Menu ID="Menu1" runat="server" />
<div class="Main">
<table>
Upvotes: 1
Views: 12772
Reputation: 91520
Couple of things to think about:
1) Are you getting this error when building the site, in a development tool like Visual Studio, for example? If you are, then take a look at the Page element at the top of the ASPX code:
<%@ Page Language="C#" %>
And make sure the inherits, source file and other attribuets are all pointing at the right class name, .cs file in the code behind. ALso check the designer.cs file for your page to make sure the Form1 property is declared.
2) If you are getting this when deploying the site and visiting it, then it's likely that you haevn't deployed the site dll's to the bin folder correctly. If it's a website project then it creates a dll per page, and you must make sure the latest version is deployed.
Posting the ASPX, and cs and designer.cs files would be useful, but some more detail about when you are seeing the error would be helpful too.
Upvotes: 4