1
Answer

MasterPage generates parser error

shane atkin

shane atkin

16y
6.8k
1
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