Tuesday, June 13, 2006

I just found out about the existence of this newly dedicated site: netfx3. After blogging already about the renamed WinFX to .NET 3.0 framework name it seems Microsoft's dedicated to the new naming.

Grz, Kris.

 |  |  |  |  | 
Tuesday, June 13, 2006 2:55:06 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [2]  |  Trackback
 Monday, June 12, 2006

Just saw that Scott Mitchell, of 4guysfromrolla fame, announced that he's busy writing tutorials about working with data in ASP.NET 2.0. You can find the tutorials in the Learn section of the ASP.NET official site among other tutorials like videos's, starter kits, ... Be sure to check out the Working with data in ASP.NET 2.0 tutorials. They're also downloadable in pdf format in both VB.NET and C#.

Grz, Kris.

Monday, June 12, 2006 8:08:05 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Saturday, June 10, 2006

Just read .NET Framework 3.0 at Somasegar's blog.

It's just rebranding of the name Microsoft pushed as WinFX, because behind the scenes it seems to be the same .NET 2.0 framework as we're having now, but with added value: Windows Presentation Foundation (WPF), Windows Communication Foundation (WCF), Windows Workflow Foundation (WF) and Windows CardSpace (WCS).

I'm already looking forward to .NET 4.0. Are you?

Update: another article by Brad Abrams is online too: Toward .NET Framework 3.0....

Grz, Kris.

 |  |  |  | 
Saturday, June 10, 2006 7:14:10 AM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Friday, June 09, 2006
Just found out Microsoft started with a Wiki: MSDN Wiki. They'll hope to get more examples form the community and by thus more information for other people. Sounds like a good idea but I guess it'll have to grow before it becomes succesfull.

Grz, Kris.

Friday, June 09, 2006 5:11:55 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Wednesday, June 07, 2006

Thanks to the newly added service by Microsoft in Belgium, I was told that this service was already longer available for other countries, called MSDN Connection one can purchase every month a book of the month at a 40% discount. Today I bought those of May and June:

May:

CLR via C# Second Edition

June:

Programming Microsoft ASP.NET 2.0 Applications: Advanced Topics

The weather's finally getting better in Belgium so I can relax and read some interesting stuff the next couple of weeks.

Grz, Kris.

Wednesday, June 07, 2006 5:11:02 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Tuesday, June 06, 2006

Most people are getting aware of the new upcoming version of Office. There are already several resources available and I thought I'd list some:

Some videos: Channel 9 In the office
Some report by Forrester: Developers get ready for 2007 Office system
A quick introduction to the new UI of 2007 Office System: First look 2007 Office System
extension code samples, supplemental developer white papers: 2007 Office System Starter Kit: Enterprise Content Management Starter Kit

Grz, Kris.

Tuesday, June 06, 2006 7:02:40 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [1]  |  Trackback

Anyone who knows me, knows that I like Star Wars. I was quite amused when I found out about this little flash movie: Store Wars.

Grz, Kris.

Tuesday, June 06, 2006 6:12:23 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Monday, June 05, 2006

I read this kind of questions multiple times on the ASP.NET forums. Most of the time it's suggested that one can use one of the events of the grid control they're using to use the FindControl method to find a Label control in one of the template columns and add the current row number to its Text property. I also used to do it like that when I started with ASP.NET.

However it can be done easier, and in markup, without the use of events, and best of all, the grid controls(1) of ASP.NET support the technique.


Figure 1: The GridView, DataGrid, Repeater and DataList controls shown to present the technique.

If Figure 1 you can see that it also supports pagination, which is shown in the GridView control.

Code says more than words so here goes:

    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 DataGrid1_PageIndexChanged(object source, DataGridPageChangedEventArgs e)

    8     {

    9         DataGrid1.CurrentPageIndex = e.NewPageIndex;

   10         DataGrid1.DataBind();

   11     }

   12 </script>

   13 

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

   15 <head runat="server">

   16     <title>Autonumbering grid controls</title>

   17 </head>

   18 <body>

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

   20     <div>

   21         GridView</div>

   22         <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"

   23             AutoGenerateColumns="False" DataSourceID="SqlDataSource1" PageSize="5">

   24             <Columns>

   25             <asp:TemplateField>

   26                 <ItemTemplate>

   27                     <%# Container.DataItemIndex + 1 %>

   28                 </ItemTemplate>

   29             </asp:TemplateField>

   30                 <asp:BoundField DataField="CategoryName" HeaderText="CategoryName" SortExpression="CategoryName" />

   31                 <asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />

   32             </Columns>

   33         </asp:GridView>

   34         <br />

   35         DataGrid

   36         <br />

   37         <asp:DataGrid runat="server" ID="DataGrid1" DataSourceID="SqlDataSource1" AllowPaging="True" OnPageIndexChanged="DataGrid1_PageIndexChanged" PageSize="5">

   38             <Columns>

   39                 <asp:TemplateColumn>

   40                     <ItemTemplate>

   41                         <%# Container.DataSetIndex + 1 %>

   42                     </ItemTemplate>

   43                 </asp:TemplateColumn>

   44             </Columns>

   45         </asp:DataGrid><br />

   46         Repeater<br />

   47         <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1">

   48             <ItemTemplate>

   49                 <span style="margin-right:20px;"><%# Container.ItemIndex + 1 %></span>

   50                 <span><%# Eval("CategoryName") %> <%# Eval("Description") %></span><br />

   51             </ItemTemplate>

   52         </asp:Repeater><br />

   53         DataList

   54         <br />

   55         <asp:DataList ID="DataList1" runat="server" DataSourceID="SqlDataSource1">

   56             <ItemTemplate>

   57                 <%# Container.ItemIndex + 1 %>

   58                 CategoryName:

   59                 <asp:Label ID="CategoryNameLabel" runat="server" Text='<%# Eval("CategoryName") %>'>

   60                 </asp:Label><br />

   61                 Description:

   62                 <asp:Label ID="DescriptionLabel" runat="server" Text='<%# Eval("Description") %>'>

   63                 </asp:Label><br />

   64                 <br />

   65             </ItemTemplate>

   66         </asp:DataList>

   67         <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"

   68             SelectCommand="SELECT [CategoryName], [Description] FROM [Categories]"></asp:SqlDataSource>

   69     </form>

   70 </body>

   71 </html>

For simplicity I used the SqlDataSource control that ships with ASP.NET 2.0 and used the Northwind database (lines 67 - 68). The following lines are of importance: 27, 41, 49 and 57. The + 1 is added each time because of the zero based index.

As you can see, it's each time a very simple addition to the markup of the grid control you're using but it adds that nice extra touch of information that endusers like to see.

Grz, Kris.

(1): I tested it upon the GridView, DataGrid, DataList and Repeater controls.

kick it on DotNetKicks.com

Monday, June 05, 2006 2:27:28 PM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [2]  |  Trackback
 Sunday, June 04, 2006

While reading through the blogs I'm subscribed to, for the ones interested I use RSSBandit, I found these interesting links(1) on the blog of Smetty's Soapbox.

On figure 1 you can clearly see that the forename Kris was quite popular in that time. On figure 2 you'll see that my last name van der Mast is most popular where I live. For the ones who know a bit about the geography of Belgium: I live in Essen which is at the top of the red colored part on the map.


Figure 1: Kris was quite a popular name when I was born in 1975.


Figure 2: van der Mast is most popular in the province of Antwerp.

Grz, Kris.

(1): Forename & Lastname.

Sunday, June 04, 2006 8:57:02 AM (GMT Standard Time, UTC+00:00)  #    Disclaimer  |  Comments [0]  |  Trackback