protected void btnsubmit_Click(object sender, EventArgs e) { try { filename = System.IO.Path.GetFileName(upldphoto.PostedFile.FileName); filename = GetUniqueFileName(filename); if (filename != null) { upldphoto.SaveAs(Server.MapPath("../Upload/Docters/" + filename)); } bool a = obj.saveRecord(1,txtName.Text,txtPhone.Text,txtEmail.Text,txtAddress.Text,txtExpertise.Text,txtExp.Text,filename,txtQualification.Text); if (a == true) { Lblinfo.Text = "Record has been succesfully saved"; txtName.Text = ""; txtAddress.Text = ""; txtEmail.Text = ""; txtExpertise.Text = ""; txtExp.Text = ""; txtPhone.Text = ""; txtQualification.Text = ""; } else //Lblinfo.Text = "Record Not Saved"; Lblinfo.Text = a.ToString(); } catch (SqlException ex) { Response.Write(ex); } }
upldphoto.PostedFile
upldphoto.PostedFile.FileName
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)