SessionID -> UserId Insert and View

J

Jim

Using either EW or VSE2008, I want to have a GridView that will:
- Insert the logged in user's UserId from either the User table or the
membership table when the user inserts a record.
- When the user views the GridView, only their records are shown. I don't
want to use a query string that uses the UserID for securtiy resons, so I'm
thinking that I can use a SessionID that is tied to the UserId?

Requests:
1. Insert a record that will automatically insert UserId
2. View reords in GridView that belong to the logged in user with SessionID

I'm not sure what all I need to do to get the SessionID working? I have put
"<sessionState mode="InProc" cookieless="false" timeout="20" />" into my
web.config file.
But now what?

Thank you for any help.
 
J

Jim

Thanks for the reply, but I'm not sure what to do with this.
Where do I put this string?

I'm coding in VB ASP.NET.

Thanks.
Peter Bromberg said:
It sounds like you just want to store the UserID in a Session variable,
e.g.
Session["userId"]=UserID;


--Peter
"Inside every large program, there is a small program trying to get out."
http://www.eggheadcafe.com
http://petesbloggerama.blogspot.com
http://www.blogmetafinder.com



Jim said:
Using either EW or VSE2008, I want to have a GridView that will:
- Insert the logged in user's UserId from either the User table or the
membership table when the user inserts a record.
- When the user views the GridView, only their records are shown. I
don't
want to use a query string that uses the UserID for securtiy resons, so
I'm
thinking that I can use a SessionID that is tied to the UserId?

Requests:
1. Insert a record that will automatically insert UserId
2. View reords in GridView that belong to the logged in user with
SessionID

I'm not sure what all I need to do to get the SessionID working? I have
put
"<sessionState mode="InProc" cookieless="false" timeout="20" />" into my
web.config file.
But now what?

Thank you for any help.
 
J

Jim

Peter -
Can you explain in further detail how to use this Session["userId"]=UserID
in VB?
1. What need to be in the web.config file
2. What would the aspx page need?
3. What would the aspx.vb page need?

Thank you for this. I have tried to Google the string and didn't come up w/
anything.

Peter Bromberg said:
It sounds like you just want to store the UserID in a Session variable,
e.g.
Session["userId"]=UserID;


--Peter
"Inside every large program, there is a small program trying to get out."
http://www.eggheadcafe.com
http://petesbloggerama.blogspot.com
http://www.blogmetafinder.com



Jim said:
Using either EW or VSE2008, I want to have a GridView that will:
- Insert the logged in user's UserId from either the User table or the
membership table when the user inserts a record.
- When the user views the GridView, only their records are shown. I
don't
want to use a query string that uses the UserID for securtiy resons, so
I'm
thinking that I can use a SessionID that is tied to the UserId?

Requests:
1. Insert a record that will automatically insert UserId
2. View reords in GridView that belong to the logged in user with
SessionID

I'm not sure what all I need to do to get the SessionID working? I have
put
"<sessionState mode="InProc" cookieless="false" timeout="20" />" into my
web.config file.
But now what?

Thank you for any help.
 

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,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top