1
Reply

MasterPage generates parser error

shane atkin

shane atkin

Jul 11 2008 3:14 AM
6.8k
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)
Next Recommended Forum