SESSION VARIABLE IN JAVA SCRIPT

Pooja Malohtra

Total Post:47

Points:331
Posted by  Pooja Malohtra
 2668  View(s)
Ratings:
Rate this:

Please explain about how to read a session variable in JavaScript which is defined externally.

Can we read this within the page?


 

  1. Uttam Misra

    Post:125

    Points:897
    Re: Session variable in Java script

    use global variable in your ASPX file : var sessionValue = '<%= Session["YourKey"] %>'.

    Now this global variable will be visible to the external JavaScript files that's included in the page.

    You can use "sessionValue" as you need.

  1. Pooja Malohtra

    Post:47

    Points:331
    Re: Session variable in Java script

    thank you

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!