Skip to main content
Home Forums General Silverlight Getting Started get post data
2 replies. Latest Post by rshelby on July 1, 2009.
(0)
racsus
Member
73 points
158 Posts
07-01-2009 9:09 AM |
I have this address: http://localhost/hola_mundo.xaml?tipo=1
How can I get the data "tipo" in vb code?
Thanks, Oscar
rshelby
277 points
66 Posts
07-01-2009 9:20 AM |
If you're on the client side it's: Dim myQueryStringValue As String = System.Windows.Browser.HtmlPage.Document.QueryString("tipo")
If you're on the client side it's:
Dim
On web service side it's:
Dim myQueryStringValue as String = HttpContext.Current.Request.QueryString("tipo")
07-01-2009 9:34 AM |
Sorry, I forgot to mention that if the querystring doesn't exist, it will throw an error using the above code. To make sure the querystring value exists first use:
Sorry, I forgot to mention that if the querystring doesn't exist, it will throw an error using the above code.
To make sure the querystring value exists first use:
If System.Windows.Browser.HtmlPage.Document.QueryString.ContainsKey("tipo") Then