Saturday, November 18, 2006

I just installed the latest tool from the Live division on my laptop: Windows Live Mail Desktop. I got 10 invitations at the moment so anyone interested of getting one, just leave a comment to this post.

At first glance I can quickly connect to my live mail/hotmail account and see the subscribed RSS feeds of my IE7 RSS platform being integrated. The look and feel, even on Windows XP, is that of Windows Vista. Nice to see that because my laptop won't be capable of displaying the Aero or Glass look in Windows Vista.

One thing I noticed is that i doesn't nicely integrate with my gmail account. Apparently it can't connect to the pop server of gmail. I hope to see this one fixed in the update of this version.

Grz, Kris.

Saturday, November 18, 2006 11:33:59 AM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [1]  |  Trackback
 Thursday, November 09, 2006

Well, after a couple of hours a sleep, I went out with some of the collegues (but didn't make it as late as some others ;-)), I decided to attend the following courses:

  • ADO.NET 2.0 tips and tricks:
  • WCF Building secure , reliable and transacted distributed services: okay this session was a bit too deep for me at the moment because I didn't play around with the bits before.
  • Hands on lab: since I couldn't really follow the last session I thought to go out for hands on lab on WCF. Unfortunately it didn't work after typing all that code. Even the "ask the experts" guys couldn't find what went wrong. Too bad but I hope to have some time to install the final bits of .NET 3.0 the next week and play around with the RTM bits.
  • White board discussion about AJAX by Shawn Burke: my first white board discussion and it went pretty well. I was one of the guys asking the most questions about why the betas are using prototypes instead of closures for example. If you're interested: they did it because it performs better and is much easier to debug, especially to hook up debuggers in visual studio.
  • Creating custom activities for WF: interesting session and I really would love to get my hands dirty on this new stuff. The last year and a half I spent my time creating a rules engine for our client with .NET 2.0. Man, why couldn't WF be there in that time frame?? Really it would've made the lives of the team a lot easier.

After the sessions there was time for a country drink sponsored by Microsoft. We were put together with the delegates from Luxembourg and France. The pub could have been better but heck there was sangria, beer and tappas. Also a lot of known faces/collegues to talk to. Our little after party was in the Hard Rock cafe in pretty Barcelona.

Well, that's the wrap up for the second day.

Grz, Kris.

Thursday, November 09, 2006 2:24:00 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Tuesday, November 07, 2006

Our first day is over so I guess it's about time to write something about it.

The keynote was very interesting with several great speakers showing emerging technologies like AJAX, LINQ, Office 2007 with some custom made side panels for Excel. The WPF part of the keynote was like WOW. The AJAX part showed drag & drop behavior and the simplicity of the UpdatePanel for a clothing shop where a customer could drag clothes over a model and via the UpdatePanel it got refreshed without flickering or any noticeable delay. Smooth!

The first session was "Developing rich web applications with AJAX" which was more of a small introduction about the capabilities of the product.

The second session, "Developer and Designer AJAX bliss with Visual Studio and Expression", was kind of a dissapointment for most attendees because the largest part of the session was actually about the new product Expression and only a small part was about AJAX. The session itself can be found here.

The third session, "ASP.NET AJAX, tips & tricks", was a very interesting session, showing that since recently localization is part of the game. The profileservice was shown and how to create your own Extender control.

The fourth session by Kimberly Tripp called "SQL Server 2005 optimizing procedural code", was also interesting. Although I'm not really into SQL Server stuff that deep I did learn some nice commands and optimization stuff that I would like to check out on books online afterwards. If you ever have the chance to see Kimberly give a presentationm just go. She's a very good speaker and really knows her stuff. She's got a dedicated site available: http://www.sqlskills.com/.

Another opportunity for me was to speak with Fredrik Normen, who's also a moderator on the ASP.NET forums like me. Nice to see some people that I've only know from the community in real life.

Grz, Kris.

Tuesday, November 07, 2006 6:30:13 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  |  Trackback

The last couple of weeks I got several questions about my article on creating custom macros for dasBlog. The biggest problem seems to be that most people run dasBlog under ASP.NET 1.1 while the macros were created in .NET 2.0. Xerratus made an article about it a while ago but I would like to point out to it since it's not an isolated story. The article can be found here: DasBlog custom macros "error" solved.

Grz, Kris.

Tuesday, November 07, 2006 6:22:26 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Monday, November 06, 2006

My collegue and I arrived in Barcelona after a flight of about 2 hours. The registration went smoothly and I'm really looking forward to the sessions that'll start tomorrow. The hotel itself, in the center of the city Barcolona, is new since the beginning of this year and is quite comfortable. The internet connection however in the hotel is a bit slow but it can keep up with my typing ;-). The weather is also a lot better than in Belgium so the next thing we'll be doing is to take a peek in what Barcolena has to offer.

Grz, Kris.

 

Monday, November 06, 2006 4:42:09 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Sunday, October 29, 2006

The freely available tool WebMatrix, which I used on my old pc to develop ASP.NET pages several years ago, came with a built in webserver, code named Cassini, so a developer could test his/her pages on the localhost.

With the .NET 2.0 framework this localhost only webserver's shipped and if you don't have Visual Studio 2005, or the free Visual Web Developer Express Edition tool (which is the follow up of WebMatrix), you can still execute your pages and view the outcome in a browser.

Here's a little guide on how to proceed:

Create a folder on your hard drive. In this example I created c:\MyASPNETPages\ where my testpage will reside. The testpage itself contains this code:

    1 <%@ Page Language="C#" %>

    2 

    3 <script runat="server">

    4 

    5     protected void Page_Load(object sender, EventArgs e)

    6     {

    7         Label1.Text = DateTime.Now.ToShortDateString();

    8     }

    9 

   10 </script>

   11 

   12 <html>

   13 <head runat="server">

   14     <title>Test Page</title>

   15 </head>

   16 <body>

   17     <form id="form1" runat="server">

   18     <div>

   19         <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

   20     </div>

   21     </form>

   22 </body>

   23 </html>

Now start up a DOS box (Start | Run, type in cmd followed by enter). Navigate to the folder C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

If you don't know how to do this you can type in the following in the opened DOS box:
cd \windows\microsoft.net\framework\v2.0.50727

After that you can type in the text in bold:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>webdev.webserver /port:8088 /path:
"c:\MyASPNETPages" /vpath:"/Test"

Ok what does this mean?

webdev.webserver is the executable itself with the following arguments: port, path and vpath. Port and vpath are optional parameters. After typing the previous lines in bold in and pressing enter a webserver starts up (Figure 1):


Figure 1: Started up webserver

From Figure 1 we can also see what our url will look like (http://localhost:8088/Test).
This demonstrates the purpose of the port and vpath arguments. Port is the port number on which the server will listen. The default is 80 but if you have IIS running, like me, it's better to use another number or they will conflict.

 

After starting the webserver I can easily navigate to my webpage by typing in the url in the address bar of my browser: http://localhost:8088/Test/

As you would've expected I get to see the current date displayed in my page.

If I ommit the vpath argument it would default to "/", meaning that I can navigate to my pages by just typing in this in the address bar: http://localhost:8088/test.aspx

Grz, Kris.

Sunday, October 29, 2006 1:05:19 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Tuesday, October 24, 2006

You can listen to the podcast from Hanselminutes.com. Podcast 37 is an interview with Scott Guthrie.

Also Dino Esposito was busy writing about/teaching ASP.NET AJAX. This resulted in an upcoming book called Introducing ASP.NET 2.0 AJAX Extensions. Best of all, you can download a free chapter of it here.

The TOC of the upcoming book:

  • Building Blocks of Ajax-style Web Applications
  • Building Blocks of the Atlas Application Framework
  • Updatable Page Fragments
  • Atlas Control Toolbox & Behaviors
  • The Atlas Client Library
  • Web Services
  • Client-side Data Binding
  • Atlas Gadgets
  • I can only hope that the final book will cover the updated Microsoft AJAX bits since last week the Beta 1 was released and I already saw on the ASP.NET forums, where I'm a moderator and top 10 poster, that a lot of threads are added with questions/problems about the new bits as there seems to be a lot of changes since the CTP releases.

    Grz, Kris.

    Tuesday, October 24, 2006 12:56:18 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [3]  |  Trackback

    While I was reading through all the subscribed blog feeds that I keep track of (indeed too much to read, too little time available) I found out that Charles provides a link to a chapter about 3D in XAML that didn't make it in the final book. You can download it here as a word document: Chapter 32. Entering the Third Dimension.

    Grz, Kris.

    Tuesday, October 24, 2006 8:01:36 AM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  |  Trackback
     Monday, October 23, 2006

    When I was still a kid I enjoyed creating stuff from paper or carton. A bit of glue and scissors and lots of fun. Also origami was something I enjoyed and it wouldn't be the first time I folded a Crane.

    I stumbled upon this site today but I did find a great resource of paper models and origami that you can print out and fold. Boy, why didn't this stuff exist 20 years ago?

    Well, here's the link to the good stuff: http://cp.c-ij.com/english/3D-papercraft/.

    If someone knows where I can find a tutorial on creating a paper/carton clock please tell me.

    Update: Malcolm Metzler emailed me with this link: http://www.yamaha-motor.co.jp/global/entertainment/papercraft/index.html. Looks great.

    Grz, Kris.

    Monday, October 23, 2006 2:46:20 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  |  Trackback

    Setting the Width property of a control in ASP.NET is mostly done in the properties pane or by declaratively setting it in the markup. However sometimes you want to set it in code. This can be done by using the Unit structure.

    I crafted some small example that you can run to play around with the different UnitType enumerations. Possible choises are:

    Cm Measurement is in centimeters. 
    Em Measurement is relative to the height of the parent element's font. 
    Ex Measurement is relative to the height of the lowercase letter x of the parent element's font. 
    Inch Measurement is in inches. 
    Mm Measurement is in millimeters. 
    Percentage Measurement is a percentage relative to the parent element. 
    Pica Measurement is in picas. A pica represents 12 points. 
    Pixel Measurement is in pixels. 
    Point Measurement is in points. A point represents 1/72 of an inch. 

    The sample provided here loops over the possible unit types and fills up the dropdownlist. The second textbox is used to fill in an amount to set the Width of the first textbox control to. If you don't fill in an amount it automatically defaults to 30.

        1 <%@ Page Language="C#" %>

        2 

        3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

        4 

        5 <script runat="server">

        6 

        7     protected void Page_Load(object sender, EventArgs e)

        8     {

        9         if (!Page.IsPostBack)

       10         {

       11             // Set the original width to 300 pixels

       12             TextBox1.Width = new Unit(300);

       13 

       14             // Loop over the possible unit types

       15             foreach (string s in Enum.GetNames(typeof(UnitType)))

       16                 DropDownListSelectUnitType.Items.Add(Enum.Format(typeof(UnitType), Enum.Parse(typeof(UnitType), s), "G"));

       17         }

       18     }

       19 

       20     protected void Button1_Click(object sender, EventArgs e)

       21     {

       22         // Obtain the chosen width, if it's not filled it default to 30

       23         int width = !String.IsNullOrEmpty(TextBoxSetWidth.Text) ? Convert.ToInt32(TextBoxSetWidth.Text) : 30;

       24 

       25         // Obtain the chosen unit type

       26         UnitType type = (UnitType)Enum.Parse(typeof(UnitType), DropDownListSelectUnitType.SelectedItem.Text, true);

       27 

       28         // Use the Unit structure to set the width of the textbox

       29         TextBox1.Width = new Unit(width, type);

       30     }

       31 </script>

       32 

       33 <html xmlns="http://www.w3.org/1999/xhtml" >

       34 <head runat="server">

       35     <title>Untitled Page</title>

       36 </head>

       37 <body>

       38     <form id="form1" runat="server">

       39     <div>

       40         <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br />

       41         <br />

       42         <br />

       43         Width: <asp:TextBox ID="TextBoxSetWidth" runat="server" Width="40px"></asp:TextBox><br />

       44         Type: <asp:DropDownList ID="DropDownListSelectUnitType" runat="server">

       45         </asp:DropDownList><br />

       46         <asp:Button ID="Button1" runat="server" Text="Set Textboxes width" OnClick="Button1_Click" />

       47     </div>

       48     </form>

       49 </body>

       50 </html>

    Grz, Kris.

    Monday, October 23, 2006 10:05:53 AM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  |  Trackback

    I installed IE7 last week and really enjoy it. This morning I took a look at the on10 site of Microsoft and saw the video about addons for IE. I like the inline search capability of FireFox and when I saw there's an addon for IE available I immediately installed it. It's a bit of a shame that it isn't the default search functionality in IE but the addon does the work :-).

    Taken from the website: Inline Search is an extremely useful free add-on for Internet Explorer that mimics Firefox's search behavior, it turns searching into a Web page into a non modal research experience coupled with a search as you type facility. It integrates flawlessly into IE (version 5.5 or above), giving it that little extra that makes you a lot more efficient when you are looking for a specific piece of information.

    You can download the addon here.

    Grz, Kris.

     | 
    Monday, October 23, 2006 8:40:02 AM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  |  Trackback
     Sunday, October 22, 2006

    I develop on several different pc's like the one that's provided by the customer, my laptop, ... I'm one of those people that likes their custom added keyboard shortcuts, custom color markup in the code. Loosing these settings, or having to set them all again when changing to another computer, would be cumbersome and a waste of time. Luckely for us Visual Studio 2005 provides the ability to export these settings and import them on another computer.

    Exporting:

    Go to Tools | Import and Export Settings... and the following screen will appear (Figure 1):


    Figure 1: Import and Export Settings Wizard

    Choose Next and the following screen will be displayed:


    Figure 2: Select the settings to export

    Check all the settings you want to export and choose Next. In the next step you can provide the location and name for the exported settings:


    Figure 3: Specify a name for the exported settings and a location

    Choose Finish the wizard will export all your settings. Now you just copy the generated file to your other pc and follow the Importing steps.

    Importing:

    Go to Tools | Import and Export Settings... The screen of Figure 1 will display. Choose Import selected environment settings and click Next. You get another possibility to first backup the current settings of the new computer. If it's your computer you can decide to not backup the current settings but if it's a pc that's also used by others its a wise precaution to backup first!


    Figure 4: Possibility to backup the current settings before importing new settings. 

    Then you select the settings you want. In this example I chose the exported settings:


    Figure 5: Select the settings to import


    Figure 6: Select settings to import

    After that you choose Finish and let Visual Studio 2005 import the settings.

    Grz, Kris.

    kick it on DotNetKicks.com

    Sunday, October 22, 2006 2:05:16 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  |  Trackback

    I was unaware of this at first, which gave me some frowns on my face when I found out the hard way, but results in SQL Server Management studio are truncated to a certain amount of characters. Normally you won't notice this but when a certain line exceeds that amount you'll notice the truncated text. I experienced it while concatenating several columns casted as varchars.

    By default the maximum amount of characters is 256 but you can easily edit this setting by going to Tools | Options. There you set a higher number of maximum displayed characters in the right lower corner of the screen when you navigate to Query results |SQL Server | Results to Text (or to Grid):

     

    Grz, Kris.Recenet

    kick it on DotNetKicks.com

    Sunday, October 22, 2006 1:22:30 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  |  Trackback