J
Jerry
I am creating an ASP.NET page that does the following:
The Page_Load event connects to the database to populate a dropdown
list.
The Button_Click event connects to the database to check if the record
ID already exists and if it doens't, it gets the highest ID.
Another connection inserts the new records to the database.
The Button_Click even uses the same SqlConnection and two different
SqlCommands (one with a DataReader to check for the existing record and
get the highest ID).
Is this the proper way to do things or is there a more efficient way to
do it? I'm very new to .NET and wish to learn things the correct way
first (I ordered a book and it's on the way).
Thanks,
The Page_Load event connects to the database to populate a dropdown
list.
The Button_Click event connects to the database to check if the record
ID already exists and if it doens't, it gets the highest ID.
Another connection inserts the new records to the database.
The Button_Click even uses the same SqlConnection and two different
SqlCommands (one with a DataReader to check for the existing record and
get the highest ID).
Is this the proper way to do things or is there a more efficient way to
do it? I'm very new to .NET and wish to learn things the correct way
first (I ordered a book and it's on the way).
Thanks,