Just a few coding tips
This is the new address. I'll be posting much more about Silverlight so I think that SilverlightShow.net is a better place for my blog. Hope I see you there. Emil
I was presented with the 2009 Microsoft MVP award earlier today! That's pretty exciting for me and I'm glad that my contributions to both online and offline communities were valued so high. I got the award for my contributions in the Silverlight community so I'm a Silverlight MVP. Thanks all for the support! See you Emil
A bit late but here they are:
Building Mesh-enabled applications using Live Framework
This year the exciting conference Microsoft Days 2009 will be held on 14-15 April for IT Specialists and 16-17 April for Developers.
Just a reminder for those of you who are interested to share some knowledge with the Silverlight community - you have only 10 days left to submit an article for the "Silverlight: Write and Win" contest running on SilverlightShow.net.
Updated to Silverlight 2 RTW!
Since I started using Twitter I've been looking for a cool Silverlight widget I can put on my blog. Well, I found only Flash widgets so I just built a Silverlight one by myself.
Unfortunately I'm not able to place it on this blog because of the shrunk CommunityServer features available to me.
Apply a RowFilter on a DataView which filters a column of type System.Guid and can contain a variable number of values.
Linking to a resource from a reusable control in different levels in your web app folder tree can be a tedious and not so obvious task.
I've just registered for the 2008 Launch in Athens. I guess most of you are exciting about MIX08 now but I won't be able to join this event and I'll have to satisfy myself with the 2008 Launch and I hope with the REMIX. I'm sure it will be fun so if you are somewhere near Athens be sure to attend. The event is free of charge. Check out the sessions here.
I fall in a couple of situations where I needed to get the client’s culture from the server side in an ASP.NET application. I googled this and found only client side solutions, but I knew there was some way to get this information because the ASP.NET framework supports client based culture (through the (UI)Culture = "Auto" in the page attributes and the globalization section in the web.config). The only way I thought of getting the client culture was from the Request object.
After examining the HTTP Headers collection I found the Accept-Language header. It contains information about the user's preferred languages. This is a sample Accept-Language header:
The languages are explicitly defined in the browser and their order is determined. You are probably wondering what this q-thing means. According to the RFC 3282 (Content Language Headers) it specifies the language quality or in other words the language priority set in the client's browser. In the example above bg-BG (Bulgarian (Bulgaria) has highest priority then en-US (English (United States)) and the last preferred language is ar-BH (Arabic (Bahrain)).
The Accept-Language header lists all languages set in the browser in a comma separated list which makes it easy to extract each language.
From ASP.NET you can access this header using the Headers collection in the Request object - Request.Headers["Accept-Language"]. Then you can process it the way you like.
Raj Kaimal gave a useful tip that instead of using Request.Headers["Accept-Language"] you can simply use the HttpRequest.UserLanguages to get a sorted string array of client language preferences. Thanks Raj!
I hope you find this tip useful.