Windows Phone 7 Open Browser from Button

I love Stack Overflow… They saved me from a Windows Phone 7 problem.

Basically, I was trying to use a WebBrowserTask to open a URL in a browser from my phone app. It kept opening a browser, but without the address bar populated.

Turns out, when you are debugging your application, it fails. Running outside of debug mode, the browser opens to the proper link just fine.

WebBrowserTask task = new WebBrowserTask();
task.URL = Uri.EscapeDataString(sURL);


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s