In a% of users, if the user clicked edit / delete their own account, I would like to know how to hide the row or disable the GridView
button but only for the logged in user, or click the button to edit / delete an error in order to prevent it from being erased / edited.
I tried something like this:
if (IDUtilizador == Convert.ToInt32(Session["IDUtilizador"]))
{
lblUtilizadoresInfo.ForeColor = System.Drawing.Color.Red;
lblUtilizadoresInfo.Text = "Operação mal sucedida, para alterar as definições de newsletter, acesse Front Office, 'Minha Conta', 'Assinaturas'.";
lblUtilizadoresInfo.Visible = true;
MultiViewContentInfo.Visible = true;
GridViewManage.DataBind();
}
}
But this way whenever I click the back button of the browser I can edit that user, being a huge bug.
Thank you.