What I Learned in WP7 – Issue 10

by Jeff Blankenburg 24. December 2010 09:30

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.

Tags:

windows phone

Comments

12/24/2010 6:33:29 PM #

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


Ashish Sadanandan | Reply

Add comment


(Will show your Gravatar icon)

 

biuquote
  • Comment
  • Preview



My Sponsor

Popular Series

31 Days of Windows Phone 7

31 Days of Silverlight

28 Days of Did-You-Know (Diduary)

Windows Phone 7 Developer Resources

Windows Phone 7 User Resources

Calendar

<<  March 2011  >>
MoTuWeThFrSaSu
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910

View posts in large calendar