How to Save a Email Address in Windows Phone 7 using C# ?

Saving a Email Address is as similar as that of Saving a Phone Number in Windows Phone 7 .

If you used the SavePhoneNumberTask to save the phone number , then we have SaveEmailAddressTask to save the Email Address .

The SaveEmailAddressTask has the property Email which enables the user to set the email address .

private void button1_Click(object sender, RoutedEventArgs e)
     SaveEmailAddressTask saveEmailLauncher = new SaveEmailAddressTask();
     saveEmailLauncher.Completed += new EventHandler<TaskEventArgs>(saveEmailLauncher_Completed);
     saveEmailLauncher.Email = "";

void saveEmailLauncher_Completed(object sender, TaskEventArgs e)
     if (e.TaskResult==TaskResult.OK)
          MessageBox.Show("Email Address saved");

When the Show Method is called , the contacts applications is opened where the user can include the email address to the new Contact or add it to the existing contact .

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

2 Responses

  1. Pingback: How to Save a Email Address in Windows Phone 7 using C#

Leave a Reply