Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Saied 349 posts 674 karma points
    Sep 19, 2015 @ 01:26
    Saied
    0

    Does Umbraco have a unique Session value when the browser is open?

    I am building a custom shopping cart and I was going to store a unique identifier in Session and also in my database for future use?

    I know I can use Session["CartId"], but does Umbraco have something else I can use and does it have something I can put in Session["CartId"]. I was just going to set this to a new Guid at first, but I noticed Umbraco creates some upfrt value when using @Html.BeginUmbracoForm.

    Is this something I can use to uniquely identify shopping carts while the browser is open? If I want to store it in the database, what datatype is recommended?

    Thanks

  • Matthieu Nelmes 102 posts 385 karma points
    Sep 19, 2015 @ 10:01
    Matthieu Nelmes
    0

    I think what you're looking for is:

    HttpContext.Current.Session.SessionID
    

    However, storing as a Guid is another issue as I was also looking at this - http://stackoverflow.com/questions/29693492/current-sessionid-convert-to-guid

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies