Installation and deployment Questions on installation, system configuration and deployment to the live server.
Version 5.x > Installation and deployment > UserID - View modes: 
User avatar
Member
Member
zamora.roberto-lcithenetwork - 4/28/2011 12:10:04 PM
   
UserID -
Hi Guys
My name is roberto, from Mexico

I am developing a new button control where I want to know UserID of the user clicked it, and his session is ON,
I have to transfer you some data from a SQL statement of Kentico Data Base.

Thanks! :)


User avatar
Certified Developer 8
Certified Developer 8
dvanbale - 4/29/2011 1:41:13 AM
   
RE:UserID -
Hello Roberto,

You can use the following line of code in your click event handler to retrieve the current UserID.

CMSContext.CurrentUser.UserID

Regards,

User avatar
Member
Member
zamora.roberto-lcithenetwork - 4/29/2011 10:39:19 AM
   
RE:UserID -
Thanks dvanbale, I have UserID :)