You must Sign In to post a response.
  • Category: ASP.NET

    How to set more than one value in session variable ?

    Are you looking for a way to set more than one value in session variable ? then read this thread to know how to do it

    hi sir,
    Actually i hve a that i'am binding more then one in this i'am taking product name based on label.that value stored in session.after page redirecting only first value can be displayed in another page. so i want display more then one products in checkout.aspx.
    sory for spelling mistakes but please understand this qution.
  • #757886
    you can create as many session objects as possible as session is maintained uniquely for each user on the server side. If you want to save more than one value in the same session object then you need to save them by separating them using a special character such as ~ and then while using the value separate them using split function and passing this ~ character as a separator.
    Miss. Jain
    Microsoft Certified Technology Specialist in .Net

  • #757888
    You can store complete array of multiple variable or even datatable can stored on session object if you want to multiple value in same session.
    Regards & thanks
    Arvind kumar

  • #757901
    Hi Sadiq,

    Find the below example for storing and retrieving multiple values in a single session :

    List<string> Names = new List<string>{"ABC","DEF","XYZ"};

    Session["Example"] = Names;
    var example = Session ["Example"];

    Hope this will help you.
    Mark the answer if it helped you.

    Nirav Lalan
    DNS Gold Member
    "Failure is the path of least persistence"

  • #757940

    Kinldy find the below mentioned Links. It may help u lot.






  • #758064
    hi every one,

    ok. My qution not perfect so i'am placing one picture see the picture and tell the answer
    My qution is in this i'am clicking proceed to chekout button in this only first row will be redirecting remainig rows not redirecting so please tell the answer as possible also related source code.
    Thanks and regards

    Delete Attachment

  • Sign In to post your comments