This is a different page with a similar setup. RequestForm a page that loads several user controls. Sometimes the user controls will instantiate the RequestForm object to call a public method. The user controls were complaining that RequestForm did not exist, so moving the RequestForm.aspx.cs file to the App_Code folder resolved that issue. Now it is the RequestForm.aspx.cs file that complains the web control references do not exist in the current context. There are compiler errors of two types.
First, over in the RequestForm.aspx file, which I did not move, this is the directive:
<%@ Page language="c#" Inherits="MERC.AircatWeb.Applications.TO107.RequestForm" CodeFile="..\..\App_Code\Applications\TO107\RequestForm.aspx.cs" %>
In the RequestForm.aspx.cs file, I have lines like this:
lnkUploadDiscrepancy.Visible = false;
The compiler says "The name 'lnkUploadDiscrepancy' does not exist in the current context."
Second, we also have a 3rd party control on the form, and the compiler gives this error: "'MERC.AircatWeb.Applications.TO107.RequestForm' does not contain a definition for 'RapidSpellWebMultiple1'". It is declared in a directive in RequestForm.aspx:
<%@ Register TagPrefix="rapidspellweb" Namespace="Com.Keyoti.RapidSpell" Assembly="Keyoti.RapidSpellWeb" %>
<
RAPIDSPELLWEB:RAPIDSPELLWEBMULTIPLE id="RapidSpellWebMultiple1" runat="server" IgnoreEmptyTextBoxes="False" ShowButton="True"></RAPIDSPELLWEB:RAPIDSPELLWEBMULTIPLE>
Thanks in advance for the help.
The aim of an argument or discussion should not be victory, but progress. - Joseph Joubert
If my post has helped you, please "Mark as Answer".