I have a client that has a SilverLight app that contains all of their products. They are wanting to create HTML pages (now that they realized they aren't ge开发者_C百科tting indexed in Google) for all of their products. On those pages they want a link to the silverlight app that will open a specific product.
I'm not a WPF developer, so I'm not sure what is possible. My first thought was maybe we can pass an id to the SilverLight app and then put some code in place to switch to the correct product.
Any ideas?
Thanks, Cole
In the asp.net host application, you can read the parameters from the query string and pass them to the silverlight plugin in the InitParams section.
More info can be found here.
Ideally you want to detect that it is Google (or another search engine) hitting your site and direct the user/search to an appropriate page (Silverlight page for people and HTML pages for Search Engines).
Navigation in Silverlight uses bookmark URLs on a single page (like website.com/silverlightpage/#item=1234) whereas your site will likely use MVC mappings (like website.com/item/1234).
From a user-experience perspective you just want to click a result in Google and go straight to the Silverlight bookmark URL equivalent.
To do this you need to catch incoming URL requests in your web site, identify any search engines, and if it is a real person redirect them to the Silverlight app page (e.g. with item id passed into the bookmark).
精彩评论