Click here to Skip to main content
12,997,531 members (60,088 online)
Rate this:
Please Sign up or sign in to vote.
See more:
In my ASP project, created a Session Variable and assigned a Value in a asp page.

I have to get this session "name" value in the another html file (.htm) thru Jquery (Javascript). Using IE 6.0 version(Browser). Is it possible or is anyother way to solve this?. Waiting for your replies.
Posted 20-Feb-13 10:51am
Updated 20-Feb-13 11:17am
If you want to add ajax to the problem, then yes. Check this link:
Get session variable with JQuery

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

use this code may be i'll help you

function abc()
var testUser = '<%= Session["User"] %>';
Tharaka MTR 23-Feb-13 3:38am
this is wrong you can't use the server side variable with .html page.
bkthebest 23-Feb-13 4:01am
do correct yourself

i am using this code in my application and it is working perfectly
KryptoMandi 25-Apr-14 4:49am
on an HTML page the alert outputs '<%= Session["User"] %>' on an aspx page it get gets the user

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170622.1 | Last Updated 23 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100