antony victor

antony victor

  • NA
  • 90
  • 22.2k

unable to link tables and bind subcategory page to gridview

Jul 10 2013 8:28 AM
I have a category table with 4 columns as and i have made Id as identity as well as Primarykey
 
ID  Categoryname  Cimage 


Then i have a subcategory table as 

ID1  Subcategoryname   Simage   Description   Catid .


In category page 

I have a Textbox (for entering name of category) and Image . I have binded it to gridview.
so my gridview displays Textbox data and image.


In my Subcategory page

I have a dropdownlist ,Textbox1 (for entering name of subcategory) , Image , Textbox2 (for entering description)

I populate the dropdownlist from category table(categoryname) 
and the rest data should be saved into database and display in gridview..


I am stuck with subcategory page .My data enters into database but unable to display in gridview....

how should i relate 2 tables with id and catid .
and how to write the ado.net connections for subcategory page..

I have been trying for weeks but dint succeed...

can anyone help me out with detailed coding. please

Thanks in advance .



Answers (31)