hi guys, I have a gridview in which when i click edit,update and cancel button comes.I have a variable named status.If status=false Then update should change to insert anf if status=true then update should be update itself.What code i hve to write in rowcammand for this?
<asp:TemplateField >
<ItemTemplate>
<asp:LinkButton ID="lnkEdit" runat="server" CommandName="Edit" Text="Edit">
</asp:LinkButton>
</ItemTemplate>
<EditItemTemplate>
<asp:LinkButton ID="lnkUpdate" runat="server" CommandName="Update" Text="Update">
</asp:LinkButton>
<asp:LinkButton ID="lnkCancel" runat="server" CommandName="Cancel" Text="Cancel">
</asp:LinkButton>
</EditItemTemplate>
</asp:TemplateField>