Passing Details between pages

A

Aidan Gill

Hello

I have a login screen, user types in username and
password, if they are validated I am retreiving their
email, fullname etc. I have a users.vb file with a class
that stores these details so when the user clicks the
login button the class is filled:
user.fullname = datareader.fields(1)
user.email = datareader.fields(2)


It stores the details fine. Then the user is directed to
another page, Main.aspx.
When the page loads I want to be able to grab the full
name from the above user class. It is coming back as blank

what am I doing wrong?
thanks
 
N

Natty Gur

Hi,

ASP.NET is stateless. The object that you initiated for one page won’t
be available for other pages or event next page call.

You can:
1) Save the object or just those two strings in the session data. As you
get more users the memory consumption will grow.
2) Embed this data in the page form as hidden field. This data will go
to/from client every call. They can be seen by the end user and they add
K to the transfer data.

Natty Gur, CTO
Dao2Com Ltd.
28th Baruch Hirsch st. Bnei-Brak
Israel , 51114

Phone Numbers:
Office: +972-(0)3-5786668
Fax: +972-(0)3-5703475
Mobile: +972-(0)58-888377

Know the overall picture
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top