Archives

Archives / 2006 / December
  • Media Player in Vista and Codec Hell

    I have installed Vista Ultimate, and I have been unsuccessfully trying to get a whole bunch of older video files playing on Windows Media player lately. I have to say the general codec support that comes shipped is pretty poor. At least 75% of my files cannot be played. You might be saying, just go download the codec’s. Well thats often easier said than done, particularly when it comes to the .ASF format. I have a small video camera that uses the .ASF format, and the software that comes with it, that I assume installs the ASF drivers, if ofcourse incompatible with Vista. Trying to find an ASF codec to use is pretty damn hard and I have had no luck thus far.

    In fact, I have wasted a few days on searching for something (no not solid searching but on and off). At any rate, I have come to the conclusion that its pretty much a waste of my time.

    A better use of your time would be a 5 minute download and install of the DivX player. You install it, and IJW (It just works), ASF format included.

    Goodbye media player.

     

     

    Read more...

  • ASP.NET Podcast statistics

    Wally sent me some log files that show how much traffic we are getting for the latest ASP.NET Podcasts. We are getting some really good stats (well I think they are good, but are probably pretty small compared to the bigger sites and more popular podcasts). We have been clocking in at up to 12,000 downloads for one of the more popular videos that Wally did, and I think my Scott Guthrie interview is getting around 6000-7000 downloads.

     

    What was really interesting out of those stats was that we got 1 download from someone with an Amiga system. Yes, 1 hit. The Amiga still lives on. This brought back memories for me as I used to own an Amiga 500, then 3000 before I got into PC’s in a big way. Prior to that was the ever popular Commodore 64. Ahhh the memories.....

     

     

     

    Read more...

  • Wally does UpdatePanel video

    Wally has produced a new video on the subject of the ASP.NET AJAX Updatepanel and the Clientside Page Lifecycle.   The video contains information about the UpdatePanel, the clientside page lifecycle, and handling errors.  This video is an updated version of the show from this past summer.

     

    Podcast Blog Here

    Subscribe to the ASP.NET Podcast

     

    Direct Downloads:

    WMV Download

    MP4 Download

    Powerpoint slides for this video

     

    Show Notes:

    *             Microsoft AJAX UpdatePanel.

    *             Clientside Page LifeCycle.

    *             Handling Errors.

    Read more...

  • ASP.NET AJAX Control Extenders - rolling your own

    The release of Microsoft ASP.NET AJAX Extensions is due very soon, and it contains a wealth of functionality. The AJAX Control toolkit is an open source, free library of controls and additional framework that sits on top of the Microsoft ASP.NET AJAX Extensions. If you want to create your own controls using the ASP.NET AJAX extensions, you can either create it using the base classes of the ASP.NET AJAX Extensions itself, or you can use the additional features that the AJAX Control toolkit provides.

    This post is going to deal only with creating controls using the base ASP.NET Extensions framework.

    There are essentially two types of controls you can build, ScriptControls and ExtenderControls. A Script control is a control that provides all its own functionality and relies on no other controls to achieve its purpose. In contrast, an Extender control targets another control and extends its functionality. The UpdatePanel and Timer is a good example of a script control, whereas the AutoCompleteExtender (contained in the Futures CTP) or the TextBoxWatermark control (contained in the AJAX Control toolkit) are good examples of extender controls. Both the extender controls target a textbox type control and extend or augment its functionality.

     

    So lets look at creating our own extender control. To do this, you need only inherit from the Microsoft.Web.UI.ExtenderControl base class like so:

    public class MyExtender : ExtenderControl

    and we only need to really implement two abstract methods:

    protected override IEnumerable<ScriptDescriptor> GetScriptDescriptors(System.Web.UI.Control targetControl)

    and

    protected override IEnumerable<ScriptReference> GetScriptReferences()

     

    GetScriptReferences tells the framework what script resources this control needs to operate. We can specify this like so:

    ScriptReference sr = new ScriptReference();

    sr.Name = "MyExtender.MyExtenderScript.js";

    sr.Assembly = "MyAssembly";

    yield return sr;

    You can define all your script references here. If you need more than one, its easier to just create a generic List< ScriptReference> collections, add as many ScriptReference objects to it as required, and return that.

    GetScriptDescriptors defines what properties and functionality your control is providing. This allows the framework to associate client side properties with server side properties, as well as create the client side behaviours, based off the properties provided on the server side or in markup.

    You can define your script behaviours like so:

    ScriptBehaviorDescriptor behavior = new ScriptBehaviorDescriptor("MyExtender.MyExtenderBehavior", targetControl.ID);

    behavior.AddProperty("MyBehaviorProperty", _someProperty);

    yield return behavior;

    In this instance, MyBehaviorProperty is a property defined within the client script behaviour object. Your (extremely simple) client side behaviour would look similar to the following:

    Type.registerNamespace('MyExtender');

    MyExtender.MyExtenderBehavior = function(element) {

        MyExtender.MyExtenderBehavior.initializeBase(this, [element]);

        var _myBehaviorProperty = null;

    }

    MyExtender.MyExtenderBehavior.prototype = {

        initialize : function() {

            ToolkitSingleClickExtender.ToolkitSingleClickExtenderBehavior.callBaseMethod(this, 'initialize');

        },

        dispose : function() {

            ToolkitSingleClickExtender.ToolkitSingleClickExtenderBehavior.callBaseMethod(this, 'dispose');

        },

        get_MyBehaviorProperty : function() {

            return this._myBehaviorProperty;

        },

        set_MyBehaviorProperty : function(value) {

            this._myBehaviorProperty = value;

        },

     }

    MyExtender.MyExtenderBehavior.registerClass('MyExtender.MyExtenderBehavior', Sys.UI.Behavior);

     

    One final note, the class itself is also typically decorated with a TargetControl attribute to tell the framework what type of control our extender is targeting. For example:

    [TargetControlType(typeof(Button))]

    public class MyExtender : ExtenderControl

    {  
        private string _someProperty = string.Empty ;
    //......

     

    So thats essentially the process for creating your own extender controls using the ASP.NET AJAX Extensions. Its a nice way of hooking server side controls and markup to client script and behaviour, with properties, events and all the goodies. I haven’t touched on the fact of embedding your script resources into assemblies and how to go about using them from there, instead of as straight script files included in your project. I also haven’t touched ondefining events and enhanced functionality within your extender client side implementation. This is all a post for another day.

    Alternatively, you can wait for the release of my upcoming Beginning ASP.NET AJAX 2.0 book that is due out early 2007 in which I am one of many authors (other authors are Wally McClure, Scott Cate, Steve Orr and Steve Smith). This topic has an entire chapter devoted to the creation of a fully working extender control using both the core framework as well as the AJAX Control toolkit.

    Read more...

  • WPF/E VS2005 Template

    I saw a link on Andrew Stopford’s blog which pointed to yet another blog by John Rayner that showed a way of installing the WPF/e template into VS2005 without Web application projects. Well, my templates still didn’t install properly and I did have the Web application project extensions installed.

     

    I managed to get it to install by running the install from a command prompt that was launched using Admin priveleges (ie. Run As Administrator). So at the command prompt, I ran the following:

     

    "C:\Program Files\Microsoft SDKs\WPFE\Tools\WPFEVSTemplate.msi"

     

    Now life is good and I have the templates installed.

     

     

    Read more...

  • Juval Lowy in Oz for WCF classes

    readify have managed to get Juval Lowy to come to Australia to present an Industrial Strength WCF master class. Juval is Regional Director, a principal at iDesign and is listed by Microsoft as a Software Legend. (His details are at: http://www.idesign.net/idesign/DesktopDefault.aspx?tabindex=3&tabid=5)

     

    There is currently only  a single master class in Sydney and Melbourne. Numbers are strictly limited as it's a very hands-on class. We've got a number of our own staff on each offering. The Melbourne class is 5th February and the Sydney class is 12th February.

     

    This is an intense class. Details are at: http://www.readify.net/Default.aspx?tabid=241. Bookings are here: http://www.readify.net/book+now!.aspx.

     

     

     

    Read more...