I made pages for login and register. I use WSAT for giving privilegies to users. I split them into two groups: Admin and Users. When the administarator login into application, he is redirected to ADMINpage. there I want to set gridwiev with informations for users. ID and USERNAME and rights for ADD and DELETE users. That's mean that administrator could delete and add users. I have to boud this gridview with membership table.
I need in this grid view administrator should delete, update and add another users?? I tried to do that with SQL Data Source, but I couldn't mark INSERT UPDATE DELETE methods. Or should I solve this problem somewhre else?? I can see the membership table with users informations displayed into grid view, but I couldn’t delete or add users into the grid view. Use this GridView and sqlDatasource.
How can I do that ?????
Thank you for your help
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataSourceID="SqlDataSource1">
<Columns>
<asp:CheckBoxField DataField="IsApproved" HeaderText="IsApproved"
SortExpression="IsApproved" />
<asp:BoundField DataField="UserName" HeaderText="UserName"
SortExpression="UserName" />
<asp:CheckBoxField DataField="IsLockedOut" HeaderText="IsLockedOut"
SortExpression="IsLockedOut" />
<asp:CommandField ShowEditButton="True" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ApplicationServices %>"
SelectCommand="SELECT [IsApproved], [UserName], [IsLockedOut] FROM [vw_aspnet_MembershipUsers]"
UpdateCommand="UPDATE [vw_aspnet_MembershipUsers] SET IsApproved = @IsApproved, IsLockedOut = @IsLockedOut WHERE (UserName = @UserName)">
<UpdateParameters>
<asp:Parameter Name="IsApproved" />
<asp:Parameter Name="IsLockedOut" />
<asp:Parameter Name="UserName" />
</UpdateParameters>
</asp:SqlDataSource>