Jeffrey could you please take a look here since this is driving me cray...
this is the code I have in Initialise.aspx.cs (the user control), the
error
I get is "CS1513: } expected"
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
public partial class Initialise_ascx
{
void Page_Load(object sender, System.EventArgs e)
{
public new MyBasePage Page
{
get { return (MyBasePage)this.Page; }
}
MyBasePage.myLiteral.Text = "asdafds";
}
}
"Jeffrey Palermo [MCP]" <
http://dotnetjunkies.com/weblog/jpalermo> wrote
in
message I make a User Control base class that does the following:
public new MyBasePage Page{
get { return (MyBasePage)this.Page; }
}
I use this all over the place.
of course (MyBasePage)this.Page works too.
Best regards,
Jeffrey Palermo
Please can someone tell me how on earth to create an instance of my top
level (base) Page class so that I can access it's objects from an user
control?? Someone told me
public myParent = (default_aspx) this.Page;
where default_aspx is the class name of the base Page...