473,386 Members | 2,129 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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

Thank you for any help.
Nov 27 '07 #1
3 2112
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
"<sessionState mode="InProc" cookieless="false" 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*******@yahoo.NoSpamMaam.comwrote in message
news:17**********************************@microsof t.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
"<sessionState mode="InProc" cookieless="false" 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*******@yahoo.NoSpamMaam.comwrote in message
news:17**********************************@microsof t.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
"<sessionState mode="InProc" cookieless="false" 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
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...
8
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...
6
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...
4
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: ...
4
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>")...
2
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...
2
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
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...
11
by: kurt sune | last post by:
Does anyone know how to retrieve the current sessionId in Global.asax.ApplicationError? /k
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...

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.