protected void btnadd_Click(object sender, EventArgs e) { int result = 0; _BookBL = new BookBL(); if (FileUpload1.HasFile) { FileUpload1.SaveAs(Server.MapPath("~/Book/") + FileUpload1.FileName); result = _BookBL.BL_Book_Insert(txtbname.Text, txtauthor.Text, txtdetail.Text, (txtprice.Text), drppublication.SelectedItem.Text, drpbranch.SelectedItem.Text, (txtqnt.Text), txtqnt.Text, "0", "~/Book/" + FileUpload1.FileName.ToString()); if (result != 0) { lblmsg.Text = "Book Added Successfullly !!"; txtauthor.Text = ""; txtbname.Text = ""; txtdetail.Text = ""; txtprice.Text = ""; txtqnt.Text = ""; drpbranch.SelectedIndex = 0; drppublication.SelectedIndex = 0; txtbname.Focus(); } } else { lblmsg.Text = "Please, Select Book Image First !!"; } }