Use currently logged-in user in query

Posted by Degan on Stack Overflow See other posts from Stack Overflow or by Degan
Published on 2009-06-11T14:23:57Z Indexed on 2010/05/16 20:40 UTC
Read the original article Hit count: 158

I am using VisualWebDeveloperExpress2008 with Access as the membership provider.

I have some cases where I want users to edit their own data. This would involve a query where the UserId should equal the UserID of the user who is using the site.

I am expecting to use WHERE UserId = ?, but I have not found out where to direct "?".

The IDE gives several choices, but I am uncertain which to choose. This, while it looks promising does not work:

<SelectParameters>
    <asp:ProfileParameter Name="UserID" PropertyName="UserId" Type="Int32" />
</SelectParameters>

What is best to use for the Select Parameter?

© Stack Overflow or respective owner

Related posts about visual-web-developer

Related posts about visual-studio-express