Hi,i got this error.
Error is:
The updated data was repeated again.when i refresh the page,it comes correctly,
How i rectify it
codings given below
---------------------------
Protected Sub GridView1_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GridView1.RowUpdating
' GridView1.AutoGenerateColumns = False
Dim row As GridViewRow
Dim Exp As TextBox
Dim Amount As TextBox
row = GridView1.Rows(e.RowIndex)
Exp = row.FindControl("Textbox1")
Amount = row.FindControl("Textbox2")
conn.Open()
mycomm.CommandText = "update get set Amount='" & Amount.Text & "' where Expenses= '" & Exp.Text & "'"
mycomm.ExecuteNonQuery()
conn.Close()
GridView1.EditIndex = -1
bind()
End Sub
---------------------
Sub bind()
myadapter = New SqlDataAdapter("select * from get where datename(Month,Currentdate)='" & DropDownList1.SelectedItem.Text & "'", conn)
myadapter.Fill(myset, "get")
GridView1.DataSource = myset.Tables(0)
GridView1.DataBind()
End Sub
---------------------