TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Israel
693
1.3k
219.5k
Sending until Progressbar processing...
Jun 1 2016 9:53 AM
Hi!
I wrote this code for sending my email. Its works!
But after to click to my button to send the content. Its make some seconds until sending completly. I need to insert a processBar into my StatusStrip (processing with a counter 1,2,3,4,5,etc) for example in wating the email to be sended totally. Its means when its end down at 100%. Its sended!
This my code:
try
{
SmtpClient client = new SmtpClient("smtp.live.com", 25);
NetworkCredential cred = new NetworkCredential("emailFrom", "password");
MailMessage Msg = new MailMessage();
Msg.From = new MailAddress(txtEmailFrom.Text);
Msg.To.Add(txtEmailTo.Text);
Msg.Subject = txtEmailSubject.Text;
Msg.Body = txtEmailContent.Text;
client.Credentials = cred;
client.EnableSsl = true;
lblConfirmation.Text = "Mail Sended Succesfully";
client.Send(Msg);
}
catch{
lblConfirmation.Text = "Error";
}
Reply
Answers (
3
)
.config could not be found
Repository Pattern Is Good Or Bad to MVC