Hi all, got a grid that displays a Rolename, RoleID and UserID for a particular user, based on the selected row of another grid.
Works fine.
Now, I want to autogenerate the delete button for the many-many table from that grid.
I have
DeleteCommand="DELETE FROM UserxRole WHERE (UserID = @UserID) AND (RoleID = @RoleID)">
in my SqlDataSource
and
<DeleteParameters>
<asp:ControlParameter ControlID="gridUsersRoles" ConvertEmptyStringToNull="False" DefaultValue="" Name="UserID" PropertyName="MasterTableView.DataKeyNames("UserID")"/>
<asp:ControlParameter ControlID="gridUsersRoles" ConvertEmptyStringToNull="False" DefaultValue="" Name="RoleID" PropertyName="MasterTableView.DataKeyNames("RoleID")"/>
</DeleteParameters>
as my parms, but it doesn't like the long PropertyName
Am I missing the simple route to do this?
Or do I need to create a couple of hidden controls to store the two IDs in?
I'm only doing this the declaritive way as I have several more of these to do.
Any advice on the fastest way is welcomed.