Jul 12, 2010 06:39 PM|gsashwin|LINK
I just started learning ASP.Net using visual basic and trying to insert data into the SQL Server database using forms, but facing hiccups.
Here's what i am doing.
I have a form with say 5 fields. Once the user clicks on submit, these fields' data should be inserted into the Sql server tables.
I am using Visual Web Developer and using the same i have dragged a sqldatasource onto my aspx page and also set up the connection. However i do not know what do i have to add in the
aspx.vb page for inserting data into the table. I need this help in VB. I looked it up on internet but could not find many related to VB. All i could find was a code for ADO.Net.
This is how my code looks like
and this is where i believe i need help with. Can anyone please let me know where do i have to use the textbox Id's and also the column names of the database. I am trying to use SQL Statements to insert data.
cmd.Connection = cnn
Please help me. Thanks,