2
Answers

log out based on parameter url

Photo of ceci bela

ceci bela

12y
1.2k
1
hi, am new in c# and  need some help. I want to log out users based on url parameter eg localhost/?parameter=logoutaction.

The code below seem to be working but want to make sure this is the correct of doing it.
 protected void Page_Load(object sender, EventArgs e)
{
        String querystr = Request.QueryString["action"];
        if (querystr == "logoutUsers")
        {        
                FormsAuthentication
.SignOut();
          Session.Abandon();
FormsAuthentication.RedirectToLoginPage();
Response.End; }


C#
}
Thanks a bunch.

Ceci

Answers (2)

0
Photo of Sean Stewart
NA 350 0 13y
Do you want to read the barcode ?

Do you want to generate the barcode ?

http://www.c-sharpcorner.com/UploadFile/jdivine/SimpleBarcodinginCSharp11212005044034AM/SimpleBarcodinginCSharp.aspx
http://www.codeproject.com/KB/miscctrl/barcodectl.aspx
http://www.barcodelib.com/net_barcode/main.html