Background Music Queue with AVPlayer and iOS4

Update 2010-Nov-11: Apple has come out with AVQueuePlayer in iOS 4.1, and presumably most people are going to move to the latest version now that it performs well even on the 3G, but the AVPlayer can still be used to manually create a queuing of items, but if you want all the hard work to be done for you, with only a few limitations, then use AVQueuePlayer instead.

Update 2010-Oct-19: Apple has been updating their documentation slightly, and it has more information now with regard to setting up an asset. This is more specifically for video, but it might help fill in the blanks for just audio. AVPlayer Playback Guide

The iOS 4.0 framework introduced AVPlayer which allows playing a MP3s from the iTunes Music Library in the background without using the iPod music player. This has a couple benefits over the MPMusicPlayerController in that you can add new items, stop, or play music in the background. Also, a custom icon can represent your app in the multitasking menu where the ipod controls are located. If you stick with [MPMusicPlayerController iPodMusicPlayer] you can play music in the background through the ipod player, but once an app goes into the background, it no longer has control over the playback of the music.
Continue reading

Microsoft marries jQuery for VS 2010

According to Scott Guthrie, jQuery will be integrated into Microsoft’s Asp.Net platform including Visual Studio 2010. They plan to basically just give developers a much better experience while using it along with Asp.Net AJAX, but they will use the main branch from jQuery and adhere to its MIT open source license. Javascript intellisense is already implemented in the 2008 line of Visual Studio, but this will enhance the jQuery library with better intellisense documentation. This is definitely great news.

Correct Click Event on Typing Enter

If you work with ASP.Net and have multiple buttons on the form that correspond to different textboxes you’ve probably run into the problem of a user pressing the “Enter” key and submitting to the wrong button’s server “Click” event.

I finally found the solution @ using Panel and DefaultButton.

You can put TextBox and Button inside the Panel and use DefaultButton property. In that case you will not need any javascript:

<asp:Panel ID="Panel1" runat="server" DefaultButton="Button1">