I want to limit the selecting of data records to only the user who created the record, OR a users who's email address belongs to the domain of the record being edited.
So, if the producer has a value in the URL of "www.mydomain.com" and their email address in the Membership is "firstname.lastname@example.org" they will be able to see the record.
I have the following table:
Table - Producer
I have figured out how to select based on the ItemUserID (see code below), but I don't know how to compair the email address values of URL and the Membership.
protected void SqlDataSource1_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
//get id of user logged in
e.Command.Parameters["@ItemUserID"].Value = Membership.GetUser().ProviderUserKey;
Can someone show me how to code my requirements?
View Complete Post