Insert using a stored procedure
Posted on 2006-06-08
In my ASP.net Page I have a form for creating users. Below are the fields on the form:
First Name Textbox
Last Name Textbox
User Id Textbox
Locations Dropdown with multipleselect option
Except Locations all others are textboxes. Locations is a ListBox with SelectionMode=Multiple.
I have two tables User_Master and User_Location
What actually should happen is when the user hits submit First Name,Last Name, User Id, Password, DOB should get inserted into User_Master and the Primarykey(id) and the selected Locations ids should get inserted into user_location table.
Can this be done with just one stored procedure. If yes, As Locations is multiple select option how can I pass the values to the stored procedure??