I have an aspx web page (asp 2.0) that consists of 2 databound drop downs, 3 txt boxes, 2 calendar controls and a button.
What I am trying to achieve is to have these form values inserted into my DB when the user clicks the button (as an aside should this SQL/ADO be in the page source or the code behind as a sub onClick??)
I'm hoping for the VB page so it is cleaner.
Most of what I have done in asp.net/vs2005 has been wizard/smart tag related and now I'm paying the price :)
I need to grab the form values and put them into an insert statement. Actually it will be 2 insert statements.
dropdownlist1 value and txtBox1 go into tableA
all the others (as well as dropdownlist1 value) go into tableB.
Should it be 2 insert statements or can you combine 2 inserts in the one command?
What I am unsure of is all the surrounding code import this, sqlcommand, sqlparameter, try/catch.