button click event
protected void btnUpload_Click(object sender, EventArgs e)
{
string filepath;
if(resumeUpload.HasFile)
{
filepath = resumeUpload.PostedFile.FileName;
string body = "My Name :" + txtNamec.Text + "
I am a" + ddlGender.SelectedItem.Text + "
My Email :" + txtEmailc.Text + "
My Mobile No :" + txtMobile.Text + "
Course :" + txtCourse.Text + "
Location" + txtLocation.Text;
I am a" + ddlGender.SelectedItem.Text + "
My Email :" + txtEmailc.Text + "
My Mobile No :" + txtMobile.Text + "
Course :" + txtCourse.Text + "
Location" + txtLocation.Text;
Label1.Text = sv.carrer(body,filepath);
}
}
my class
public string carrer(string email,string filepath)
{
try
{
string to = "[email protected]";
string from = "[email protected]";
MailMessage msg = new MailMessage(from, to);
string mailbody = email;
msg.Subject = "Smart Vidyarthi Call Back";
msg.Body = mailbody;
msg.Attachments.Add(new Attachment(filepath));
msg.BodyEncoding = Encoding.UTF8;
msg.IsBodyHtml = true;
msg.Priority = MailPriority.High;
SmtpClient client = new SmtpClient("smtp.gmail.com", 587);
System.Net.NetworkCredential basicredenital = new System.Net.NetworkCredential("[email protected]", "password");
client.EnableSsl = true;
client.UseDefaultCredentials = false;
client.Credentials = basicredenital;
client.Send(msg);
return "Message Has Been Sent";
}
catch (Exception ex)
{
throw ex;
}
}
exception: file not found eception

Deepak ThapaPosted Oct 3, 2015, 5:07 AM
Rajeesh MenothPosted Sep 11, 2015, 8:54 AM
Susanta RoutPosted Sep 11, 2015, 8:39 AM
Susanta RoutPosted Sep 11, 2015, 8:38 AM
Raja TPosted Sep 11, 2015, 8:35 AM
Susanta RoutPosted Sep 11, 2015, 8:30 AM
I am a" + ddlGender.SelectedItem.Text + "
My Email :" + txtEmailc.Text + "
My Mobile No :" + txtMobile.Text + "
Course :" + txtCourse.Text + "
Location" + txtLocation.Text;
Raja TPosted Sep 11, 2015, 8:28 AM
Rajeesh MenothPosted Sep 11, 2015, 8:24 AM
Susanta RoutPosted Sep 11, 2015, 8:20 AM
I am a" + ddlGender.SelectedItem.Text + "
My Email :" + txtEmailc.Text + "
My Mobile No :" + txtMobile.Text + "
Course :" + txtCourse.Text + "
Location" + txtLocation.Text;
Raja TPosted Sep 11, 2015, 7:59 AM
Rajeesh MenothPosted Sep 11, 2015, 7:49 AM
Susanta RoutPosted Sep 11, 2015, 7:47 AM
Rajeesh MenothPosted Sep 11, 2015, 2:54 AM
Susanta RoutPosted Sep 11, 2015, 2:46 AM
Rajeesh MenothPosted Sep 11, 2015, 2:34 AM
Susanta RoutPosted Sep 11, 2015, 2:26 AM
Rajeesh MenothPosted Sep 10, 2015, 8:38 AM