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 = "test@ginktage.com";
     saveEmailLauncher.Show();
}

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.

No Responses

  1. How to Save a Email Address in Windows Phone 7 using C# August 1, 2011 Reply

Leave a Reply


x

Interesting BlogPosts to read

How to get an Enumerator from range of elements from ArrayList in C# ?
The code snippet shown in this blog post demonstrates how you can get the enumeraor from a range of ...
How to check for the column name in an SqlDataReader Object in C# ?
When working in ADO.NET for data access , there are times when you want to check to see if a column ...
Download - Pokemon Go for for Windows 10 (Third Party app)
Pokemon Go is one of the popular AR games for android and iOS devices and now , the game is made ava...