'Try this its very easy
'create table in you database
CREATE TABLE mstemp(
empcode numeric(18, 0) NOT NULL,
fname nvarchar](50) NULL,
lname nvarchar(50) NULL,
doj datetime NULL
)
'write the following code in your aspx.vb page.
Imports System.Data
Imports System.Data.SqlClient
Public Class Form1
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim con As New SqlConnection("Data Source=mydatasource;Initial Catalog=db_emp;Integrated Security=True")
If con.State = ConnectionState.Closed Then
con.Open()
End If
Dim cmd As New SqlCommand("insert into mstemp (empcode,doj)values(@empcode,@doj)", con)
cmd.Parameters.AddWithValue("@empcode", 4)
cmd.Parameters.AddWithValue("@doj", DateTimePicker1.Value)
cmd.ExecuteNonQuery()
con.Close()
MessageBox.Show("Saved")
End Sub
End Class
'Enjoy