Showbrands.aspx

 

This page comes when the user chooses to browse the categories.This  displays the sub categories within categories.

 

The source code for this is –

 

private void Page_Load(object sender, System.EventArgs e)

              {

                     int catid =Int32.Parse(Request.Params["CategoryID"]);

                

               // Capture the category id from usermenu user control

                    

                     SqlConnection objcon = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]);

                     string sql ="Select pc.internalproductsubcategoryid,pc.categoryid,pc.categorysubname from productsubcategory pc where categoryid ='"  + catid + "'";

                     SqlDataAdapter objda = new SqlDataAdapter(sql,objcon);

                     DataSet ds = new DataSet();

                     objda.Fill(ds);

                     dsShowBrands.DataSource =ds;

                     dsShowBrands.DataBind();

 

                    

                    

              }

 

Back to main page