duplicate record insertion on postback

Sep 28, 2009 at 9:22 AM

I use VB.net


Protected Sub btnSaveClose_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSaveClose.Click
        ExtAspNet.Alert.Show("Save Complete.", String.Empty, ExtAspNet.ActiveWindow.GetClosePostBackReference())
    End Sub

   Private Sub SaveData()
        Dim mm As New MoneyType
        mm.MoneyTypeName = tbxName.Text
        mm.CreateDate = Now()
    End Sub

When i click btnSaveClose Insert data to database it duplicate record.

Please help me.

Oct 19, 2009 at 2:12 AM

I didn't see any problem in your code. Maybe you should check the Window1_Close event function in the parent window.