AddProductSubcategories.aspx

 

The source code for this similar to addcategories  and is used to add product subcategories under the main category.Just select the category and insert the subcategory name u like.

 

The save method is written here

 

 

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

              {

                     if(validation())// First checks if things are valid

                     {

                           // Instantiate an object of the adminfunctions class and cll method to add product subcategories.

                           prjstart.adminfunctions addprodcat= new adminfunctions();

                           string  catid=addprodcat.addproductsubcategories(cmbCategoryName.SelectedIndex.ToString(),txtSubCategoryName.Text);

                           if(catid != null)

                           {

                                  string strcatid = catid;

                                  string strUrl    = "addproductsubcategories.aspx?Mode=Edit" +"&" + "ParentCode=";

                                  strUrl +=  strcatid;

                                 

                                  //catsuc.Text="Record Added successfully";

                                  Response.Redirect(strUrl);

                           }

                     }

              }

 

Back to main Page