If the new insert is already deleted from the database, it was added again when refreshing the page.
So how can I, after the insert (or any commands) is done, clear the commandName of the EventArg (see below), and all the inputParameters associate with it? Thanks a million for any helps!!
Expand|Select|Wrap|Line Numbers
- protected void gvStudentsAndProjects_RowCommand(object sender, GridViewCommandEventArgs e)
- {
- if (e.CommandName.CompareTo ("Insert")==0 && Page.IsValid)
- {
- OdsStudentsAndProjects.Insert();
- databind();
- }
- }