Also this is needed in ASCX for intellisense to work:

<%@ Control Language="C#" %>

On Feb 3, 11:51 am, Cerebrus <[email protected]> wrote:
> I strongly doubt it. In any case, shared code should be in a shared
> location... say, App_Code.
>
> On Feb 3, 8:26 pm, jay <[email protected]> wrote:
>
>
>
> > Is it possible to share code between 2 ASPX files that do not have a
> > codebehind? For example, something like this:
>
> > ---file1.aspx
> > <%@ Page Language="C#" AutoEventWireup="true" %>
> > <script runat="server">
> > namespace blah
> > {
> > public int data;}
>
> > </script>
>
> > ---file2.aspx
> > <%@ Page Language="C#" AutoEventWireup="true" %>
> > <%@ Import Namespace="blah" %>
> > <script runat="server">
> > protected void Page_Load( object sender, EventArgs e )
> > {
> >     data = 1;}
>
> > </script>- Hide quoted text -
>
> - Show quoted text -

Reply via email to