Thursday, August 30, 2012

Set querystring when creating new instance of a page in code behind

Set querystring when creating new instance of a page in code behind

In a Silverlight application page I've created a new instance of another page.

MyPage2 Pippo = new MyPage2(); 

In the MyPage2 OnNavigatedTo event I do some stuff depending on the query string.

How can I pass a query string when creating a page like before?

Thanks in advance,

Bye ;)

Answers & Comments...

Answer: 1

I think your problem is based on "bad" design... I do not know what you want to do but if there is anything that gets calculated or loaded from wherever on your "MyPage2", why dont you exctract this code and use it wherever you need this information?

by : Dominik Kirschenhoferhttp://stackoverflow.com/users/725472




No comments:

Post a Comment

Send us your comment related to the topic mentioned on the blog