Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
here is my code

C#
private void btnSubmit_Click(object sender, RoutedEventArgs e)
        {


            EmailComposeTask emailComposeTask = new EmailComposeTask();

            emailComposeTask.Subject = "message subject";
            emailComposeTask.Body = "Name:" + txtName.Text + "\n"
                + "Firm Name: " + txtFirmName.Text + "\n"
                 + "Contact No.: " + txtContactNo.Text + "\n"
                  + "Address: " + txtAddress.Text + "\n"
                   + "City: " + txtCity.Text + "\n"
                    + "PinCode: " + txtPincode.Text + "\n"
                     + "State: " + txtState.Text + "\n"
                      + "EmailId: " + txtEmailId.Text + "\n"
                      + "Website: " + txtWebsite.Text + "\n"; 
            emailComposeTask.To = "example@gmail.com";
            emailComposeTask.Show();

           
            WebBrowserTask webBrowserTask = new WebBrowserTask();
            webBrowserTask.URL = "http://www.abc.in";
            webBrowserTask.Show();
}



i have downloaded windows phone sdk package and trying to send email ,there is no issue to send email but after email sent its not navigating on a website or url which i m trying to show on a browser
Posted
Updated 7-Aug-14 1:34am
v2
Comments
[no name] 7-Aug-14 7:38am    
You are probably throwing an exception. You need to debug your code and find the problem.
Kumud Dumbre 7-Aug-14 8:11am    
An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in System.Windows.ni.dll

Additional information: Exception has been thrown by the target of an invocation
Kumud Dumbre 7-Aug-14 8:11am    
i got above exception
[no name] 7-Aug-14 9:29am    
You need to debug your code and find the problem
Little-Coder 7-Aug-14 8:49am    
Use asynchronous mechanism for sending email.
Refer url : http://www.codeproject.com/Articles/667461/Send-asynchronous-mail-using-asp-net

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900