To check for user authentication and session expiry
On POPUP PAGE
Call this function on Pageload.
IsUserAuthorizedinPopUp(Convert.ToString(Session["UserId"]));
///
/// To check for user authentication and session expiry
///
///
/// To check for user authentication and session expiry
///
///
///
public bool IsUserAuthorizedinPopUp(string userId)
{
bool continueFlag = false;
bool continueFlag = false;
if ((userId == "") || (userId == "0"))
{
RadAjaxPanel1.ResponseScripts.Add("CancelEdit();");
{
RadAjaxPanel1.ResponseScripts.Add("CancelEdit();");
}
else
{
{
continueFlag = true;
}
}
return continueFlag;
}
On Nornal page (defined in pagebase)
Call this function on Pageload.
Call this function on Pageload.
IsUserAuthorized(Convert.ToString(Session["UserId"]));
/*'----------------------------------------------------------------
' Function Name : IsPublicUserAuthorized
' Purpose : This method checks authentication for the Public users
' Input : userId as String
' return output : True if authorized user else False
'----------------------------------------------------------------*/
' Purpose : This method checks authentication for the Public users
' Input : userId as String
' return output : True if authorized user else False
'----------------------------------------------------------------*/
public bool IsUserAuthorized(string userId)
{
' not cause any issues*/
bool continueFlag=false;
DisableBrowserBack();
if ((userId == "") || (userId == "0"))
{
}
else
{
else
{
continueFlag =true;
}
return continueFlag;
return continueFlag;
}
No comments:
Post a Comment