I am still new to asp.net and I’m having a problem that I just can’t figure out.
I’m using vb and the .net membership api.
My question is, how do I get the current user’s userid into a DetailsView INSERT?
<InsertParameters>
<asp:Parameter Name="UserID"/>
</InsertParameters>
In the
OnInsertingevent of yourSqlDataSourceyou can retrieve theUserIDfrom the Membership table by using theProviderUserKeyproperty of theMembershipUserclass. You can then programmatically assign this value to the UserID insert parameter.