Click here to hide categories Click here to show left categories

User: Home          welcome : Guest          Log In / Register here     




How to share the whole session with the web service

[WebMethod(EnableSession = true)]
public int SetCounter()
{
    int counter;
    if (Context.Session["Counter"] == null)
        counter = 1;
    else
        counter = Convert.ToInt32(Context.Session["Counter"]) + 1;
    Context.Session["Counter"] = counter;
    return counter;
}

Share this article   |    Print    |    Article read by 1023 times
Author:
Guest
Guest user is that user who have done some activity on website without login. Activity contains commenting on any article, uploading an image on website etc.
Related Articles:
Related Interview Questions: