shane atkin

shane atkin

  • NA
  • 1
  • 0

MasterPage generates parser error

Jul 11 2008 3:14 AM
Very simple declaration in masterpage causing this error

"Compiler Error Message: CS0103: The name 'User' does not exist in the current context"

here is the masterpage codebehind file

public partial class MasterPage : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (User.IsInRole("Administrators"))
       ImageButton.Visible = true;

can anyone help?

Answers (1)