Keep in touch

you can keep in touch with my all blogs and sites by install this Toolbar...
http://rworldtoolbar.ourtoolbar.com/

Thursday, July 10, 2008

Change password(VB.NET)

Private Sub btnsave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsave.Click
If txtretype.Text = "" And txtold.Text = txtnew.Text Then
Try
cmd = New SqlCommand("insert into login values(@a, @B)", con)
cmd.Parameters.Add("@a", txtname.Text)
cmd.Parameters.Add("@b", txtretype.Text)

cmd.ExecuteNonQuery()
MessageBox.Show("USER CREATED SUCCESSFULLY", "REGISTRATION", MessageBoxButtons.OK, MessageBoxIcon.Information)

Catch ex As Exception
MsgBox(ex.Message)
End Try
End If
End Sub

No comments: