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 9317287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T02:50:24+00:00 2026-06-19T02:50:24+00:00

I have a vb.net aspx page that i need to assign a session variable

  • 0

I have a vb.net aspx page that i need to assign a session variable inside of javascript

if i do the following

var baz ="<%=Session("User")%>";
alert(baz);

the alert i receive is the class name

 "TheName.WebFramework.Security.AdvanceUser"

i need a nested value of this session , and have no idea how to do this in vb

i do however know how to do this in C# / generic http handler

 ...
 public void ProcessRequest (HttpContext context) {
    IAdvanceUser user = context.Session["User"] as IAdvanceUser;
 ... 
    var ID = user.EntityID

and of course in php, RoR , ColdFusion, ect

I have tried this but it failed miserably

var baz ="<%=Session("User").("EntityId")%>";
alert(baz);

any ideas?

  • 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-06-19T02:50:25+00:00Added an answer on June 19, 2026 at 2:50 am

    Try this: use CType(fromObjectHere, toObjectHere)

    var baz ="<%= CType(Session("User"), AdvanceUser).EntityID %>";
    

    Update

    You might need to type the full name TheName.WebFramework.Security.AdvanceUser or import the namespace

    <%= CType(Session("User"), TheName.WebFramework.Security.AdvanceUser).EntityID %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to asp.net. I have an aspx page, that takes in user
I have an ASP.net aspx page that's composed of 3 iframes. One for the
I have a C#/ASP.NET .aspx page that declares two controls that each represents the
I'm new to web development. I have a login.aspx page that has an Asp.Net
I have a javascript function in the default.aspx page of my asp.net website project.
I am writing a web app in asp.net. I have an aspx page that
I have a .Net 1.1 webapp with a aspx page with the attribute SmartNavigation=true
I have a asp.net repeater control in a aspx page, with runat=server and an
I have an ASP.NET page with code-behind in VB.NET. On the ASPX page I
I have the list box control (ASP.NET Control On aspx page, language C# ).

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.