Archives

Archives / 2008 / December
  • My Silverlight session at DevTeach Montreal

    During my “Business oriented Silverlight 2 application” talk at DevTeach conference (december 2008) I used Visual Studio 2008 and Expression Blend to build an application that retrieves SQL server data (Beers!) through an Entity Framework model and exposes it to a Silverlight client via a WCF service and LINQ queries. I did some design and animation, added a ComboBox and DataGrid to display data and asynchronously update the model as users edit it. Then I showed how to use local cache on the client to optimize network traffic and finally applyed some Style to shape the UI.

    I had only 2 slides in my ppt deck, and here is my funny slide #2:

    I coded all that live on stage in 60 min without any errors!

    As promised here is the source code of the application I built live:

    Slides:

    [Beers Db by Andy Beaulieu]

     

    Technorati Tags:
  • Zune bag loves iPhone

    Guess what’s inside my Zune bag…

    …my iPhone!
    The original Zune suede bag is way too small to fit the Zune but I found the perfect fit now!

  • Win an MSDN Premium Team Suite at DevTeach Montreal!

    DevTeach Montreal

    Attend one of the following session by RunAtServer Consulting folks and you could win an MSDN Premium Team Suite Subscription (yes, the FULL Top of the Top package at 14 000$):

    • Advanced ASP.NET Server Control - Dominic Sévigny – December 2 at 1:30pm Viger A room
    • Business Oriented Application with Silverlight 2 - Laurent Duveau – December 4 at 1:30pm Neufchatel room

    See you there!!

    Technorati Tags:
  • ASP.NET Dynamic Data: Customize a template field

    Following my first post on ASP.NET Dynamic Data, I want to show you that you can customize existing fields used by Dynamic Data very easily.

    With the Northwind db, here is the generated edit screen for the Employees table:

     

    We could make this default user experience a lot better by changing the date input, why not add some AJAX here ?

    Template fields used by Dynamic Data are stored in DynamicData/FieldTemplates folder as simple user controls:

    You can see that there is a DateTime_Edit.ascx control, open it and add an Image for the calendar icon and a CalendarExtender from the ASP.NET AJAX Control Toolkit.

    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
    <asp:TextBox ID="TextBox1" runat="server" CssClass="droplist" Text='<%# FieldValueEditString %>' Columns="20" /> 
    <asp:Image ID="imgCalendar" runat="server" ImageUrl="~/DynamicData/Content/Images/calendar.png" />
    <ajax:CalendarExtender runat="server" TargetControlID="TextBox1" PopupButtonID="imgCalendar" />


    Now you get:

    The calendar looks weird due to some CSS applied to the DetailsView. A quick workaround is to remove the CssClass attribute from the DetailsView1 control in DynamicData/PageTemplates/Edit.aspx :

    Doing that (or fixing the CSS in Site.css file) will make the calendar looks good:

    Note that the field is still fully functional without adding code, in a next post I will show how to create a new template field.

    Source code:

     

    Technorati Tags: