Author: michaelcode | Posted on: 10/27/2009 8:52:36 AM | Views : 364

Is it possible to get the User ID of the logged in user
Dim MembershipUser As MembershipUser = Membership.GetUser()
Dim UserID As String = MembershipUser.ProviderUserKey.ToString()
And add this to the SelectCommand of the SQLDataSource.

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:myConnectionString%>"
    SelectCommand="SELECT * FROM [Favourites] WHERE ([UserID] = @UserID)">


How can I do this with the SELECT Parameters?
thanks.

...

Go to the complete details ...