Hi Selvi,


VB.NET
Private strConnString As String = ConfigurationManager.ConnectionStrings("MyConsString").ConnectionString
Private str As String
Private cmd As SqlCommand


Protected Sub Button1_Click(sender As Object, e As EventArgs)
Dim con As New SqlConnection(strConnString)
con.Open()
str = "INSERT INTO test VALUES (@amount, @description)"
cmd = New SqlCommand(str, con)
cmd.CommandType = CommandType.Text
cmd.Parameters.AddWithValue("@amount", Convert.ToInt64(txt_amount.Text))
cmd.Parameters.AddWithValue("@description", rtxt_description.Text)
cmd.Connection = con
cmd.ExecuteNonQuery()
con.Close()
Response.Write("Records Inserted")


End Sub


Thanks