I want to insert a new item in the items table, i shud first select the category from a dropdownbox under which that item will be.
Every category name has its unique ID.
How do i insert the CatID into the ITEMS table,on selecting the category name from the DropDownBox?ASP.NET DropdownList Control and Database?
Get the value selected in the dropdownbox
Dim category as string
categoryID= DropDownList.selectedValue
then use it in your SQL statement
sql=';INSERT INTO items
VALUES (categoryID, value2, value3,...)';
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment