I am trying to associate a Member with a specific record that they created through a form that I have on my site. I want the record to be associated with members profile, UserName, as well as can be searched and selected by another member, UserName, but only at a read only capacity.
I have two tables, aspnet_Users and aspnet_Genealogy, the code for the two tables is as follows:
CREATE TABLE [dbo].[aspnet_Users] (
[ApplicationId] UNIQUEIDENTIFIER NOT NULL,
[userId] UNIQUEIDENTIFIER DEFAULT (newid()) NOT NULL,
Please complete your "<span style="font-family: Arial, Helvetica, sans-serif; font-weight: bold">Genealogy Membership Profile</span>" to take full advantage of your free membership, please fillout the following information below and its <b>FREE</b>:<br />
The Default.aspx is the first page that member goes to after the new member registers, he/she must fill out that form, this is the data I want to associate with a member and also allow other members to search the aspnet_Genealogy table and be able to select and update their member profile with this role from the table, aspnet_Genealogy. The members will be able to edit the data row that he/she created at the time of creation, it will be read only to other members/UserNames other than selecting it to be added to their profile.
I have also a views file, vw_aspnet_Genealogy, the code is as follows:
1
2
CREATE VIEW [dbo].[vw_aspnet_Genealogy]
AS SELECT [FamilyName], [dbo].[aspnet_Genealogy].[FirstName], [dbo].[aspnet_Genealogy].[MiddleName1], [dbo].[aspnet_Genealogy].[MiddleName2], [dbo].[aspnet_Genealogy].[MiddleName3], [dbo].[aspnet_Genealogy].[Gender], [dbo].[aspnet_Genealogy].[DOB], [dbo].[aspnet_Genealogy].[COB], [dbo].[aspnet_Genealogy].[sOB], [dbo].[aspnet_Genealogy].[COOB], [dbo].[aspnet_Genealogy].[Newsletter], [dbo].[aspnet_Genealogy].[DateTimeGenealogy] FROM [aspnet_Genealogy]
The ResultsMembers.aspx is a gridveiw of which I assign my views table, vw_aspnet_Genealogy and joined vw_aspnet_User, UserName, at which the results are showing all the UserName being associated with the one data record that is in the aspnet_Genealogy table. I want to associate only the member that enter the original record and have all other Members/UserNames search and select from the aspnet_Genealogy table at which they will be select it to be part of their Membership/UserName Profile.
The Membership/UserName that enter the data thru the Default.aspx will be the "Owner", that means it automatically becomes part of his profile. I want that same data to be shown to other Membership/UserName, on a global basis but they can not edit the information, only select the data to become of their profile.
User Ownership of a specific row
in ASP
Posted · Edited by aswhalen
Hi There,
I am trying to associate a Member with a specific record that they created through a form that I have on my site. I want the record to be associated with members profile, UserName, as well as can be searched and selected by another member, UserName, but only at a read only capacity.
I have two tables, aspnet_Users and aspnet_Genealogy, the code for the two tables is as follows:
The SP code is for these tables, aspnet_AddCenealogy and aspnet_UserGenealogy is as follows:
There are two webpage that have been created Default.aspx and ResultsMembers.aspx, the code for these pages is:
and
The code for the two pages, Default.aspx.cs and ResultsMembers.aspx.cs, is as follows:
and
The Default.aspx is the first page that member goes to after the new member registers, he/she must fill out that form, this is the data I want to associate with a member and also allow other members to search the aspnet_Genealogy table and be able to select and update their member profile with this role from the table, aspnet_Genealogy. The members will be able to edit the data row that he/she created at the time of creation, it will be read only to other members/UserNames other than selecting it to be added to their profile.
I have also a views file, vw_aspnet_Genealogy, the code is as follows:
The ResultsMembers.aspx is a gridveiw of which I assign my views table, vw_aspnet_Genealogy and joined vw_aspnet_User, UserName, at which the results are showing all the UserName being associated with the one data record that is in the aspnet_Genealogy table. I want to associate only the member that enter the original record and have all other Members/UserNames search and select from the aspnet_Genealogy table at which they will be select it to be part of their Membership/UserName Profile.
The Membership/UserName that enter the data thru the Default.aspx will be the "Owner", that means it automatically becomes part of his profile. I want that same data to be shown to other Membership/UserName, on a global basis but they can not edit the information, only select the data to become of their profile.
I am new to this, Can any one help?
Thanks