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 .

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

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 = "[email protected]";
     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 .

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

    1 Comment

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

In this post, you will learn about sync provider notifications in Windows 11 and how to disable or enable it...
In this tutorial, let’s learn how to enable or disable the startup sound in Windows 11. By default, when Windows...
The CameraCaptureTask allows the Windows Phone 7 App to launch the Camera Application . This will be useful when the...