Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > VB.NET 2002/2003 Basics
| Search | Today's Posts | Mark Forums Read
VB.NET 2002/2003 Basics For coders who are new to Visual Basic, working in .NET versions 2002 or 2003 (1.0 and 1.1).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB.NET 2002/2003 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 6th, 2006, 09:03 AM
Authorized User
Join Date: Feb 2006
Location: , , Singapore.
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem using Session in ASP.NET

Hi, I'm having some trouble using sessions in ASP.NET and hope that someone can help me with it.

On my webform, I have a login form (using form authenticatio) and below shows a snippet of the code for the page:

    FormsAuthentication.SetAuthCookie(Me.txtLoginID.Text, False)
    Session("LoginID") = Me.txtLoginID.Text
    Response.Redirect(Request.ApplicationPath & "/Admin/ManageAcct.aspx")

As you can see, upon logging in, the user is directed to the ManageAcct.aspx page.

In ManageAcct.aspx page, i did a small test to check that the LoginID is stored. At the page load portion of ManageAcct.aspx, I added the line:
However, only the session id is printed and the LoginID is not stored at all!

I've also tried using session.add("LoginID","Testing") but also cannot get the LoginID out!

Can anyone tell me what's wrong? Please help


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.Net without session. soccers_guy10 ASP.NET 1.0 and 1.1 Professional 1 May 8th, 2007 05:49 AM
Session Hnadling in Asp.net sana ASP.NET 1.0 and 1.1 Basics 0 March 30th, 2006 01:02 AM
session variables in asp to asp.net marvz ASP.NET 2.0 Basics 0 August 1st, 2005 03:09 AM
ASP .NET using C# session problem !! wireblock ASP.NET 1.0 and 1.1 Basics 4 July 17th, 2003 02:57 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.