Results 1 to 22 of 22

Thread: Simple Session Problem [RESOLVED]

Hybrid View

  1. #1
    Lively Member AjayKumar's Avatar
    Join Date
    Nov 2003
    Location
    Noida
    Posts
    94

    Re: Simple Session Problem

    Hey
    you should use Session["userID"].ToString() instead of Session["userID"] in following line.

    WO_Cmd2.Parameters.Add("@UserID", Session["userID"]);
    happy coding
    HI ITs exciting!!!!!

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2002
    Location
    The Twilight Zone
    Posts
    295

    Re: Simple Session Problem

    Hi,

    I did originally have it as : Session["userID"].ToString()

    But i would get the following error:

    Code:
    System.NullReferenceException: Object reference not set to an instance of an object.
    Error point to the following line:

    WO_Cmd2.Parameters.Add("@UserID", Session["userID"].ToString());

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width