PaulK
Posts: 15
|
Posted: 01/12/2006, 4:02 AM |
|
Hi,
Im trying to create a grid where it lists all items assigned to a user logged in however In php i would use where userid = CCGetUserID() in the visual query builder, i was wondering what i use in .asp c# instead of this function?
I have tried the following...
System.Web.HttpContext.Current.Session("UserID")
DBUtility.UserID
Thanks for any help
Paul
|
|
|
PaulK
Posts: 15
|
Posted: 01/12/2006, 5:07 AM |
|
I was also thinking, maybe i could create a function and use it to be called rather than the CCGetUserID(). However im new to .ASP and was wondering if someone could point me in the direction of how i go about creating my own common functions.
|
|
|
Stan
|
Posted: 01/12/2006, 5:09 AM |
|
DBUtility.UserID is correct syntax for the C#
|
|
|
PaulK
Posts: 15
|
Posted: 01/12/2006, 5:14 AM |
|
I tried it but i seem to get this error..
Welcome.aspx.cs(380,69): error CS0117: 'project3.Data.DBUtility' does not contain a definition for 'UserID'
|
|
|
Stan
|
Posted: 01/12/2006, 5:24 AM |
|
Oops, the correct syntax will be
DBUtility.UserId
Note, that last 'd' is small letter.
|
|
|
PaulK
Posts: 15
|
Posted: 01/12/2006, 5:29 AM |
|
bah lol, always the capitals/spellings that are a bugger to find, its worked now, cheers for the help Stan :)
|
|
|
Walter Kempees
|
Posted: 01/12/2006, 6:13 AM |
|
We all hate Camels.
"PaulK" <PaulK@forum.codecharge> schreef in bericht
news:843c659c68b682@news.codecharge.com...
> bah lol, always the capitals/spellings that are a bugger to find, its
> worked
> now, cheers for the help Stan :)
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
|