473,563 Members | 2,695 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SessionID -> UserId Insert and View

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
"<sessionSt ate mode="InProc" cookieless="fal se" timeout="20" />" into my
web.config file.
But now what?

Thank you for any help.
Nov 27 '07 #1
3 2127
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" wrote:
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
"<sessionSt ate mode="InProc" cookieless="fal se" timeout="20" />" into my
web.config file.
But now what?

Thank you for any help.
Nov 27 '07 #2
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 [C# MVP]" <pb*******@yaho o.NoSpamMaam.co mwrote in message
news:17******** *************** ***********@mic rosoft.com...
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" wrote:
>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
"<sessionSta te mode="InProc" cookieless="fal se" timeout="20" />" into my
web.config file.
But now what?

Thank you for any help.

Nov 27 '07 #3
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 [C# MVP]" <pb*******@yaho o.NoSpamMaam.co mwrote in message
news:17******** *************** ***********@mic rosoft.com...
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" wrote:
>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
"<sessionSta te mode="InProc" cookieless="fal se" timeout="20" />" into my
web.config file.
But now what?

Thank you for any help.

Dec 3 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2138
by: Christoph Pieper | last post by:
Hi, we've the following problem : We have an asp-application which sets the cookie on first login. The cookie will never be touched during user access. The user can work the whole day, but after 6 to 7 hours, the cookie get 2-4 new asp-sessionid's thus overwriting the very first entries in the cookie. Does anyone had the same problem or...
8
1994
by: Brad Simon | last post by:
I have written a shopping cart using ASP .NET (VB). It has been running quite successfully on a site for about a year or so. I use the SessionID as the key to hold information on the shopping cart. I have copy / pasted the code into a new site. Everything is working, EXCEPT for the shopping cart holding the SessionID. I have watched the...
6
7651
by: Mike Kline | last post by:
Hi There! I'm creating a HttpModule and after AcquireRequestState event, I tried to access the HttpApplication.Session.SessionID and somehow I'm getting a new value on every Refersh of ASPX page. I thought SessionID is supposed to stay static until the session timeout defined in the web.config. Or am I missing something here??? Thanks!!
4
8823
by: Andy Fish | last post by:
Hi, I have an asp.net application that is using Forms Authentication and maintaining http session state using cookies in the normal way. when the user clicks the logout button I do this: Session.Clear(); Session.Abandon(); FormsAuthentication.SignOut();
4
535
by: Kenny | last post by:
Hi, I have created an ASPX Dim ss As HttpSessionState ss = HttpContext.Current.Session HttpContext.Current.Session("tesAt") = "testValue" Response.Write(ss.SessionID() & "|<br>") Response.Write(HttpContext.Current.Session("tesAt") & "|<br>") Response.Write(HttpContext.Current.Session(ss.SessionID) & "|<br>")
2
2525
by: ocean | last post by:
I want to get the session associated with the specific sissionID. I made a activex control required to login to the server.My idead as follow: 1.Get sessionID through IHTMLDocument2 interface(a COM interface); 2.Send this value to the server; 3.Read the session associated with this sessionID and check if this session logined. Now i can get...
2
3203
by: XML newbie: Urgent pls help! | last post by:
If I get SessionID in 1 function how do I carry that SessionID(value of this SessionID) to another function or another form within the same project
10
29951
by: rlueneberg | last post by:
I am trying to foward the old sessionID using "Session.SessionID" to an HttpWebRequest CookieContainer so that I can capture the requested page session variables but it is not working as it is supposed to. The HttpResponse object always returns a different sessionID from the old one which I am trying to force. Why is objRequest not carrying...
11
4734
by: kurt sune | last post by:
Does anyone know how to retrieve the current sessionId in Global.asax.ApplicationError? /k
0
7583
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7885
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6250
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3642
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.