Link to home
Start Free TrialLog in
Avatar of miyahira
miyahiraFlag for Peru

asked on

Datalist and e.commandName

Hello,

My datalist allows to edit, update and insert records.

After executing update command on my datalist, if I press F5 on web browser and load page again,  then function ItemCommand and method  Make_Update() are called again.

Is there any way to reset e.CommandName value, so if page is refreshed with F5, then method Make_Update() is not called?
Protected Sub Datalist_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataListCommandEventArgs) Handles DataList.ItemCommand

        If e.CommandName = "update" Then
          '' If page is refreshed with F5, then Make_Update() is called again
            Make_Update()
            DataList.EditItemIndex = -1
            Load_Data()
        End If

    End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of guru_sami
guru_sami
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial