I currently have a JavaScript confirm prompt for my delete command in my GridView like so:

<asp:LinkButton  runat="server" CommandName="Delete" Text="delete"
                                OnClientClick="return confirm('Are you sure you want to DELETE this record?');"
                                CausesValidation="False" CssClass="adminLinks" NavigateUrl="#" />

Then for my delete command, I'm running this update code:

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:sqlConnection2 %>"

            DeleteCommand="UPDATE [jeakins].[tbl_submit] SET recycle_bin=1 WHERE [ID] = @ID"></asp:SqlDataSource>

How can I change this from a confirm box to a prompt box that asks "Reason for Deletion?" and then use that variable in the DeleteCommand to update a delete_reason field?

Thank you!!

Related posts

Recent Viewed