web 2.0

How to Get Information About Browser, Web Page and Cookies

 

As Silverlight application is hosted in web browser, you might somehow want to get some information about it like browser name, version, platform or user agent. Or you might want to check whether cookies are enabled before reading/writing them. It's pretty easy indeed, because Silverlight exposes the references to the browser and page instances in System.Windows.Browser namespace. They're all there. HtmlPage holds the information of the current web page, and BrowserInformation holds that of the browser. Here's a quick example of how to get the name of the browser:

Dim name As String = Browser.HtmlPage.BrowserInformation.Name

For more details: 

Download Full Source Code - BrowserInfo.zip (37.57 kb)

View Online demo (requires Silverlight 1.1 September Alpha Refresh)

Tags:

Silverlight 1.1 | Tutorial

Comments

Busby SEO Test , on 11/26/2008 1:53:29 PM Said:

Busby SEO Test

thanks for the information about this browser

uk franchise information , on 5/29/2009 11:10:54 PM Said:

uk franchise information

Browsing a few blogengine.net blogs - seems a great platform.  Best wishes with your blog, cheers, dave.

Southern Highlands real estate , on 7/12/2009 3:53:43 AM Said:

Southern Highlands real estate

Thanks for sharing it. A lot of users would have found it helpful. Thanks.

Soakaway , on 10/8/2009 6:49:51 AM Said:

Soakaway

Delighted I encountered this how to post.  How to Get Information About Browser Web Page and Cookies  - I have been looking for data on how to address this at the moment  and was pulled in by the title of the article in Bing.  Studying text books and reports has not been advantageous but a few web lookups has created a resolution which will assist me greatly.  Could we get by without the Net.  Thanks, I will use the information and must keep your site as a reference.

fast loan , on 10/19/2009 2:39:14 AM Said:

fast loan

Just try to smile for about 2-3 mins then you can get back to work

fast cash advance , on 10/20/2009 6:07:29 AM Said:

fast cash advance

Just try to smile for about 2-3 mins then you can get back to work

Add comment


(Will show your Gravatar icon)

biuquote
  • Comment
  • Preview
Loading