What I Learned in WP7 – Issue 10

First, I hope everyone has a great holiday.  I’m going to be disappearing for a  few days, but I’ll likely be back by Tuesday, December 28.  I recommend that you do the same.  Step away from the computer, and find some people to spend time with.  Family, friends, colleagues (sometimes they’re not your friends, right?), neighbors, etc.  Spend some time with the people you care about.  It’s important.


Yesterday, I mentioned how you can pass data using a query string in Windows Phone development.  @PhraseMeme (on Twitter) was kind enough to remind me that you should probably consider escaping your data before passing it as a query string, just as you would in a website.  To do this, you can use the Uri.EscapeDataString method to convert all of your non-reserved characters to their hexadecimal equivalents.  Obviously, when you receive that data, you’ll also want to use the UnescapeDataString method to convert it back.

One thought on “What I Learned in WP7 – Issue 10

  1. It seems you don't need [b]Uri.UnescapeDataString[/b] when you receive the string. According to the MSDN docs for [b]NavigationContext.QueryString[/b] (http://tinyurl.com/2f8l7s6):
    [quote]The values from the query string are decoded before being stored in the QueryString collection.[/quote]

Leave a Reply

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

WordPress.com Logo

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

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s