Addcategories.aspx
This screen is used to add the categories to the
site and is used only by the admin.
private void
Button1_Click(object sender, System.EventArgs
e)
{
if(validation())
// if it has passed validation then only go
ahead
{
// Instantiate an object of the class adminfunctions and
call method addproductcategories which will execute the stored procedure.
prjstart.adminfunctions
addprodcat= new adminfunctions();
string
catid=addprodcat.addproductcategories(txtCategoryName.Text);// Exceutes the Stored procedure.
if(catid != null)
{
string strcatid = catid;
string strUrl =
"addcategories.aspx?Mode=Edit" +"&" +
"ParentCode=";// This is for goin to the
PArticular URL and with an Edit mode so
// that the application reacts to the mode and disables the
controls once it is saved.
strUrl
+= strcatid;
//catsuc.Text="Record Added successfully";
Response.Redirect(strUrl);
}
}
}