tags:

views:

334

answers:

1

If an http request is made to an asp web page, then the asp code can access the query string via the Request.QueryString object.

What's the analagous way to do this in xaml? For example, say that I wanted to write a simple xaml page that just echoes the query string back in the response. What would the code for this look like?

A: 

Since you mention query strings and responses, I'm assuming you're talking about XBAPs (ie WPF applications hosted in the browser).

Check out this blog post:

How can I pass Querystring parameters to my WPF XBAP Application?

Once you've got the ApplicationDeployment.CurrentDeployment.ActivationUri value as a string it should be fairly trivial to pump it into a TextBlock on a page. Heck, you may be able to bind directly to it if you wanted to go that far.

Matt Hamilton