If you have an ASP.NET master page defined as below which specifies a css class for the body element to generate a background image for the whole page, you might want to override the default background on specific pages.
One way to accomplish this is to use jQuery to replace the css class that is being applied to the <body> element.
The master page below declares 2 ContentPlaceHolder controls; the first (ID="head") exisist within the <head> element, the second (ID="MainContentPlaceHolder") exists within the main body of the page.
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<asp:ContentPlaceHolder ID="head" runat="server">
<form id="form1" runat="server">
<asp:ContentPlaceHolder ID="MainContentPlaceHolder" runat="server" />
In one of our child pages we could add the following:
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
A cool thing about jQuery is that you can have multiple $(document).ready() defined - for example you could also have some jQuery defined in the master page.
I'm working on a Silverlight media player like you get on MySpace and other sites. The app is meant to be as simple as possible, so i've created a Silverlight-enabled WCF service which returns a list of the MP3s available in the songs directory on the server. To allow the SL app to be as loosely coupled to the location of the physical mp3s, the wcf service needs to return a list of fully qualified URIs to each mp3 in the directory. When the user selects a song to listen to we can simply set the MediaElement.Source to the URI.
The following post contains some great code (that can even be used outside of a WebForm) to convert "~/myfolder/mysubfolder" to http://foo.bar/myfolder/mysubfolder".
To enable Intellisense for jQuery in VS2008:
Once you add the -vsdoc.js to your project you might have to restart VS and re-open your project for Intellisense to start working...
The 3 week master program costs US$18,500 (I'm assuming not inclusive of accommodation!) and runs in Redmond, Washington.
You have to be accepted onto the program by supplying a CV and potentially a 30-60 min interview (after paying $125 non-refundable fee).
No dates as yet for upgrade exams, but if you're an existing MCPD (Windows, Web or Enterprise) you'll be able to take a single upgrade exam (except for Enterprise where 2 exams are required.
The first version of my Silverlight scale\chord finder is complete, it can be found at http://www.dontcodetired.com/live/silverkeys/
I'd like to improve the UX around the scale degrees, perhaps a circle of scale degrees...(I also have some TODO:s to do around refactoring)
I'll be posting source eventually in addition to an explanation of some of the more interesting elements..
The UI (or should I say UX now?) is 90% complete (for this iteration that is) as the image below shows. There are a few bug fixes left to complete, plus I'd like to to some moderate re-factoring of both the 'business' logic and the XAML.
I'll post some of the more interesting aspects of the project in later posts and either make the source available from here or I might look at uploading to Codeplex et al so others can go ahead and take it forward if it's found to be interesting. There also be a 'live' version available. I'll be using it personally to try out different keys & progressions for future compositions.
Although MSDN says you can use the FrameworkElement.Tag Property to store an arbitary object, if you try to store anything other than a string you get a System.Windows.Markup.XamlParseException. It seems I'm not the only one to notice this.