Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6901041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:37:24+00:00 2026-05-27T07:37:24+00:00

I am using an external javascript file for my asp.net project. Now i want

  • 0

I am using an external javascript file for my asp.net project. Now i want to get the session value in that javascript. How can i get the session value in that javascript file?

Thanks in advance..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:37:25+00:00Added an answer on May 27, 2026 at 7:37 am
    <script>
    var someSession = '<%= Session["SessionName"].ToString() %>';
    alert(someSession)
    </script>
    

    This code you can write in Aspx. If you want this in some js.file, you have two ways:

    1. Make aspx file which writes complete JS code, and set source of this file as Script src
    2. Make handler, to process JS file as aspx.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What's the best practice for using ASP.NET expressions inside an external Javascript file? I'm
How can I load an external JavaScript file using a bookmarklet? This would overcome
I have defined a GWT module that includes an external javascript file using tag.
What are pros of using an external javascript file? I just can't figure it
I have an external javascript file that relies on the presence of another file.
I'm writing a webpage that relies on an external javascript file (that I have
$('#<%= txtFirstName.ClientID%>').show(); Trying to send ClientId to external Javascript file using server tags as
In a javascript file I'm calling an ASP.NET Ajax PageMethod (ASP.NET 3.5), correctly defined
I am developing a website in ASP.NET and I am using various javascript frameworks/libraries.
I have the following code in an external JavaScript file that is called within

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.