Example #1
0
 protected void btnAddMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         mainmenu = new MainMenuBLL();
         if (mainmenu.NewMainMenu(txtItemname.Text, txtPermalink.Text, mainmenu.MaxItemindex() + 1, chkStatus.Checked))
         {
             Response.Redirect(Request.Url.AbsoluteUri);
         }
         else
         {
             this.AlertPageValid(true, "False to connect server !", alertPageValid, lblPageValid);
             return;
         }
     }
     catch (Exception ex)
     {
         this.AlertPageValid(true, ex.ToString(), alertPageValid, lblPageValid);
     }
 }