Asp.Net News
Free Tech Magazines
Asp.Net Web Hosting
Suggest Us
Link to Us
Feeds Subscription
Questions & Answers
Tips & Tricks
 how to update database using gridview with dropdownlist in with c#
Posted by neha purani on  2/21/2011 9:18:23 PM Category: Asp.Net 2.0
Add to my favorites
Email to friend
I have one table Subcategory in which category from the category table comes. I need to use category name for adding record in subcategory table. How can i do that?

Post Your Reply Post New Question

 Viewer's Reply
Adding SubCategory Based on Category
Answered By Moderator1 on 3/11/2011 9:51:25 PM

You can list out the Category in a dropdown. The user needs to select the Category and input the SubCategory description, then click "Add" button. Then you can insert the record into the subcategory table and display in gridview.
Use Foreign Key
Answered By self innovator on 12/9/2011 10:49:14 PM
use foreign key in your tables.

By Selecting the Category pass the selected values as a parameter to your (SP) then load the sub category dropdown with selected category.
Post Your Reply If you still have problem, post it again under this reply for better response.

Sponsored by
Simply SQL - Free 111 Page Preview!
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
When Good HTML Goes Bad: How You Can Protect Your Web Applications