# Saturday, 23 June 2007

Since I became an MVP I also got into the VIP pool of people. This was my first time but it was nice to see some other Belgian MVP's but also others that made it to the VIP pool thanks to their outstanding community awareness. First we had an informal meeting as to what direction Microsoft sees the community going and where the VIPs see it going. Not all people were developers but also IT pro's were there. Some of them I already knew but most of these people were strangers to me. After we had introduced ourselves there was an IT pro that came to me and said: "thanks for the help on the forums". Apparently he had asked a question on the ASP.NET forums and I helped him out (and actually gave a correct answer too).

After that meeting we settled down in our hotel rooms, a very nice hotel in Ostend (Golden Tulip Bero). After that we gathered for a small game in Ostend where we had to find several key locations and put a card on a board that corresponded with something we could see in the neighbourhood. It was fun and actually the team I was in did win. After the competition we had a nice dinner in the Kursaal (a known building in Ostend). After that we gathered in a lounge bar with a lot of possible cocktails. I had some nice chats with several people that evening/night and not everything was tech related.

The day afterwards, which came too soon as I nearly couldn't sleep during those 4 hours I spent in the hotels bed, I was the first of the group to eat breakfast. But soon several other members of the group joined me so I immediately had some new conversations going on.

Normally at 10 o'clock the group would gather to play some other games but some of us had to leave. I was one of them as I went to Westend to team up with my parents.

Actually I had a lot of fun and want to thank the people that made it possible for me to attend it and I hope to see the other VIP people back soon.

Community | MVP | Personal | VIP | Microsoft
Saturday, 23 June 2007 14:13:15 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Friday, 15 June 2007

Hi,

just found out about this sample application: .NET StockTrader Sample Application.

This application is an end-to-end sample application for .NET Enterprise Application Server technologies. It is a service-oriented application based on Windows Communication Foundation (.NET 3.0) and ASP.NET, and illustrates many of the .NET enterprise development technologies for building highly scalable, rich "enterprise-connected" applications. It is designed as a benchmark kit to illustrate alternative technologies within .NET and their relative performance. The application offers full interoperability with J2EE and IBM WebSphere's Trade 6.1 sample application. As such, the application offers an excellent opportunity for developers to learn about .NET and building interoperable, service-oriented applications.

Since the weather in Belgium isn't that great at the moment I think I know what I'll be checking out the next week.

Grz, Kris.

Friday, 15 June 2007 07:22:59 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Wednesday, 13 June 2007

Yes, another year older for this guy. For IT minded people I'm going from 11111 to 100000 by the way. And for people that whish to know: I was indeed born on a friday the 13th back then. But I don't consider it bringing bad luck.

Grz, Kris.

 

Wednesday, 13 June 2007 07:29:54 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [6]  | 
# Monday, 11 June 2007

Several Belgian user groups, BIWUG, VISUG, SQLUG, IT-Talks, and Pro-Exchange, will be having a community day on juni 28th. If you're living in Belgium, eager to learn, and just want to talk to peers or have the opportunity to meet new people with the same interests, be sure to check it out!

I also would've loved to come but due to obligations at work I'm unable to attend.

Grz, Kris.

Monday, 11 June 2007 21:25:02 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Saturday, 09 June 2007

Find the latest 3 issues here as a pdf document: http://www.aspnetpro.com/PDF/asp_PDF_3Mags.asp.

Grz, Kris.

Saturday, 09 June 2007 20:05:35 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [2]  | 

I see that question appearing on the ASP.NET forums over and over again so I decided to dedicate a post on the subject. There are, depending on the .NET framework properties available that can help one out:

Grz, Kris.

Saturday, 09 June 2007 19:02:12 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Monday, 28 May 2007

Normally you have the possibility to choose Enable Selection in the Smart tag of a GridView control. This results in an extra column in front of the GridView with the text Select. But what if you don't want it like that but want to be able to use an image for example to select that row?

Well, a neat solution's to add a TemplateField and in the ItemTemplate place an ImageButton control. Why this one? Because it has a CommandName property available you can use. All you have to do is to set it to the predefined word Select.

Here's a small example to show what I mean:

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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> </script> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataSourceID="SqlDataSource1"> <Columns> <asp:CommandField ShowSelectButton="True" /> <asp:BoundField DataField="LastName" HeaderText="LastName" SortExpression="LastName" /> <asp:BoundField DataField="FirstName" HeaderText="FirstName" SortExpression="FirstName" /> <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" /> <asp:TemplateField> <ItemTemplate> <asp:ImageButton ID="ImageButton1" CommandName="Select" runat="server"
ImageUrl="../App_Themes/Black/Images/bullet-1.gif" /> </ItemTemplate> </asp:TemplateField> </Columns> <SelectedRowStyle BackColor="Red" /> </asp:GridView> <asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" SelectCommand="SELECT [LastName], [FirstName], [Title] FROM [Employees]"></asp:SqlDataSource> </div> </form> </body> </html>

Grz, Kris.

Monday, 28 May 2007 15:46:12 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Sunday, 27 May 2007

Since recently the ASP.NET forums got an upgrade to the new Community Server 2007 there's also the possibility to show your Fans and Friends. Not really much at the moment since the feature's a little unknown by most members at this moment and you have to enable some parts in your Profile.

If you're a member reading this you can enable it by clicking on the Edit Profile button in the right upper corner, navigate to the Favorites tab and check the Share Friends checkbox and hit save at the bottom of that page. After that it's easy to add friends by going to their public profile of a member you see on the forums or, if you know their nickname, navigate directly to http://forums.asp.net/members/nickname.aspx. So for me that becomes http://forums.asp.net/members/XIII.aspx.

Then click the Add as friend link and go back to your public profile and voila, the person appears in your friends list.

Grz, Kris.

Sunday, 27 May 2007 11:22:24 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [4]  | 

When you start creating a new ASP.NET 2.0 site with Visual Studio 2005 or Visual Web Developer Express (VWD) and want to start using it you'll notice that a new file in the App_Data folder gets created besides your own database, namely the aspnetdb.mdf file. This extra database holds all the tables and stored procedures to let Membership, Roles, Profile etc run smoothly.

However a problem arises when you don't want to use that dedicated new database when you want to deploy to your live webserver, certainly not when you use a host that only offers one database and charges you extra for another database. Luckely you can control things more when using the dedicated aspnet_regsql tool that ships with the .NET 2.0 framework.

What I'm about to describe in this article is how to use that tool to generate a SQL script that you can use to run on your other database with a tool like SQL Server Management Studio (SSMS). In this example I'll be using the installed Northwind database on my localhost developer machine.

Just start up a new DOS box by going to Start | Run and type in cmd followed by enter. In Windows Vista you push the blue windows logo button and in the field with the text Start Search you type in cmd followed by ctrl + shift + enter. The reason for that combination is that you must run it under Admin privileges or else the to be generated file doesn't get writed to disk.
A new DOS box will appear and you just navigate to the following directory/folder:

Windows\Microsoft.NET\Framework\v2.0.50727\

If you're not used to using DOS you can navigate to it by typing this in the DOS box: cd \windows\Microsoft.net\framework\v2.0.50727 followed by enter.

Then you type in this line: aspnet_regsql.exe -E -S localhost -d Northwind -A all -sqlexportonly c:\membership.sql again followed by enter. At the location c:\ a new file gets generated: membership.sql.

The Northwind name in the parameter list is later on used to set the db name in the generated sql file: SET @dbname = N'Northwind'

Once generated you can use/tweak this file to be used in SSMS to get executed and to install everything needed in the database.

Ok, up untill now we focussed on getting everything ready on the database side but we also have to let our ASP.NET 2.0 application know that we're pointing out to another database than the default one. The solution for this is to override the default settings for the LocalSqlServer connectionstring which can be found in the machine.config file.

<add name="LocalSqlServer"
connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;
AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"

providerName="System.Data.SqlClient" />

To override that you open the web.config file in your application which can be normally found in the root of the application. Go to the <connectionStrings> element.

<connectionStrings>
    <remove name="LocalSqlServer"/>
    <add name="LocalSqlServer" connectionString="The connection string to your
                         (new) database"
providerName="System.Data.SqlClient" />
</connectionStrings>

Notice the second line where you call the remove statement. This is needed in order to be able to override the LocalSqlServer connection string!

If you're in need of a little help to get your connection string right there's a dedicated site: http://www.connectionstrings.com/.

If you're interested in creating one dedicated database for multiple applications you can also check out Scott Guthrie's post: Configuring ASP.NET 2.0 Application Services to use SQL Server 2000 or SQL Server 2005.

Grz, Kris.

Sunday, 27 May 2007 09:46:38 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  | 
# Saturday, 26 May 2007

I just received my PopFly invitation. I hope to find some free time the next weeks to play around with it. In case you don't know what PopFly is, check out my previous posts about the subject:

Grz, Kris.

Technorati tags:

Saturday, 26 May 2007 10:19:59 (GMT Daylight Time, UTC+01:00)  #    Disclaimer  |  Comments [0]  |