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
  1. Home
  2. Web Development
  3. ASP.NET
  4. ASP.NET Create Session Problem

ASP.NET Create Session Problem

Scheduled Pinned Locked Moved ASP.NET
helpcsharpasp-netquestionlearning
3 Posts 2 Posters 0 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.
  • D Offline
    D Offline
    drexler_kk
    wrote on last edited by
    #1

    Hello Everyone~! This is the code I use to create the session on MemberPage1: //The textbox1 is the username. I create it as a session to pass to other page. Session("Username") = TextBox1.Text Response.Redirect("MemberPage2.aspx") This is the code I use on another page MemberPage2: Dim Username As String Label3.Text = "Welcome " & Session("Username") & "" //I want to test it with displaying a welcome follow by username. But the above code doesn't work.The Session remains null.I'm beginner in ASP.NET with VB backed code. Anyone can tell me the error or any other solution? Thank you~!

    P 1 Reply Last reply
    0
    • D drexler_kk

      Hello Everyone~! This is the code I use to create the session on MemberPage1: //The textbox1 is the username. I create it as a session to pass to other page. Session("Username") = TextBox1.Text Response.Redirect("MemberPage2.aspx") This is the code I use on another page MemberPage2: Dim Username As String Label3.Text = "Welcome " & Session("Username") & "" //I want to test it with displaying a welcome follow by username. But the above code doesn't work.The Session remains null.I'm beginner in ASP.NET with VB backed code. Anyone can tell me the error or any other solution? Thank you~!

      P Offline
      P Offline
      Pallavi Bhoite
      wrote on last edited by
      #2

      hi, how i am using session in my application .. its in c#.. Session["sername"]=TextBox1.Text //its right then on page 2 no need to define variable again Label3.Text = "Welcome " + Session["Username"].ToString(); check ,if this giving u value or not. :)

      pallavi

      D 1 Reply Last reply
      0
      • P Pallavi Bhoite

        hi, how i am using session in my application .. its in c#.. Session["sername"]=TextBox1.Text //its right then on page 2 no need to define variable again Label3.Text = "Welcome " + Session["Username"].ToString(); check ,if this giving u value or not. :)

        pallavi

        D Offline
        D Offline
        drexler_kk
        wrote on last edited by
        #3

        Thank you Mr Pallavi. I got it now. Thank you so much. :) Regards Drexler

        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