I'm using ASP C# VS 2015. I managed to generate a gridview with data from MySQL. The update and delete command appear as links and I managed to hooked them up to the events properly.
Now I would like to add a feature to add confirmation before delete plus a message (textbox) for reason of deletion?
How do I do that in .NET?
I'm well versed in PHP and jQuery but still in learning curve in .NET. Thanks in advance.
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" DataKeyNames="id"
OnRowDataBound="OnRowDataBound" OnRowEditing="OnRowEditing" OnRowCancelingEdit="OnRowCancelingEdit"
OnRowUpdating="OnRowUpdating" EmptyDataText="No records has been added." OnRowDeleting="OnRowDeleting" OnRowDeleted="OnRowDeleted">
<Columns>
<asp:TemplateField HeaderText="Id" ItemStyle-Width="20">
<ItemTemplate>
<asp:Label ID="lblId" runat="server" Text='<%# Eval("id") %>'></asp:Label>
</ItemTemplate>
<ItemStyle Width="20px"></ItemStyle>
</asp:TemplateField>
<asp:TemplateField HeaderText="Email">
<ItemTemplate>
<asp:Label ID="lblEmail" runat="server" Text='<%# Eval("email") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:CommandField ShowEditButton="True" ShowDeleteButton="True" DeleteText="Reject" headertext="Controls"></asp:CommandField>
</Columns>
</asp:GridView>