My master page code looks something like this:
namespace Recipes
{
public partial class MasterPage : System.Web.UI.MasterPage
{
...
public void UpdateUserLogin()
{
NicknameLbl.Text = ((Recipes.BasePage)Page).CurrentUser.Nickname;
}
...
}
}
I want to call the UpdateUserLogin()
method from a user control, something like this:
((Recipes.MasterPage)this.Page.Master).UpdateUserLogin();
But for some reason the compiler doesn't know Recipes.MasterPage
(are you missing an assembly blablabla).
Sorry I can't show the exact error message, it's in French.
Maybe the problem is that I added the Recipes
namespace around MasterPage
manually, it wasn't added by VS.
By the way I'm using VS Web Developer Express 2008.
Do you have any idea how I can make this call work?