Beispiel #1
0
 protected void btnadd_Click(object sender, EventArgs e)
 {
     if (photo.HasFile)
     {
         //create the path to save the file
         string fileName = Path.Combine(Server.MapPath("~/Offer"), photo.FileName);
         //save the file to our local path
         photo.SaveAs(fileName);
         //AlumniImage.ImageUrl = "~/AlumniPhoto/" + PhotoUpload.FileName;
         strphoto = photo.FileName;
     }
     i = obj.AddComboOffer(txtname.Text, "~/Offer/" + strphoto, txtdesc.Text, Convert.ToDecimal(txtrate.Text), "Admin", DateTime.Now.ToString());
     if (i > 0)
     {
         BindGrid();
         ClearFields();
         lblmsg.Text = "Offer Added Sucessfully";
     }
 }