Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Display Session Variable in HTML Text

Display Session Variable in HTML Text

Scheduled Pinned Locked Moved ASP.NET
html
3 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Arcdigital
    wrote on last edited by
    #1

    Hey, I was wondering if there was a way to display a session variable that is outputted directly as text. Something like this Session Variable is FirstName Logged in as: {INSERT FIRSTNAME HERE} I know I could use a label and set its text on the page load, but isn't there a simpler way using the <% %> stuff :-D

    K 1 Reply Last reply
    0
    • A Arcdigital

      Hey, I was wondering if there was a way to display a session variable that is outputted directly as text. Something like this Session Variable is FirstName Logged in as: {INSERT FIRSTNAME HERE} I know I could use a label and set its text on the page load, but isn't there a simpler way using the <% %> stuff :-D

      K Offline
      K Offline
      Kannan Ar
      wrote on last edited by
      #2

      Like this? <%= Session["FirstName"] %>

      A 1 Reply Last reply
      0
      • K Kannan Ar

        Like this? <%= Session["FirstName"] %>

        A Offline
        A Offline
        Arcdigital
        wrote on last edited by
        #3

        Yes...That's exactly it! Thanks :D, can't believe it was *THAT* simple!

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups