<asp:GridView ID="GridView1" runat="server" AllowPaging="True"
DataSourceID="ObjectDataSource1" PageSize="2">
<Columns>
<asp:CommandField ShowDeleteButton="True" ShowEditButton="True" />
</Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
DataObjectTypeName="MyPhotoList.Model.Photos" DeleteMethod="Delete"
InsertMethod="Add" SelectMethod="GetAllList" TypeName="MyPhotoList.BLL.Photos"
UpdateMethod="Update">
<DeleteParameters>
<asp:Parameter Name="PId" Type="Int32" />
</DeleteParameters>
</asp:ObjectDataSource>