I'M giving my code with this..
i want is get the values from mypage.aspx page & pass it to insert query in .
vb file..like
insert into mytable(name,id) values(textbox1 value & text box2 value) so these text box value..how can i get these values in .
vb file..i want these values from my aspx page
thanx!!!!
the follwing code in .
vb file is wrong..i'm just checking it!!!
Public Class InsertData
Inherits System.Web.UI.Page
Public Function Insert(ByVal email, ByVal fname)
Dim sqlconn As SqlConnection
Dim comm As SqlCommand
Dim sql As String
sqlconn = New SqlConnection("data source=SHANTASOFTDC;initial catalog=traveldb;password=sa;persist security info=True;user id=sa;")
sqlconn.Open()
sql = "INSERT INTO user_profile_info(email,fname)VALUES ('fname',fname)"
comm = New SqlCommand(sql, sqlconn)
Return email
comm.ExecuteNonQuery()
sqlconn.Close()
End Function
End Class