ASP.NET 2.0 version numbering

Posted on January 8th, 2007 in Software development by chris

Today I decided to display the version number of the web application I’m writing, but had to do some hunting around to see how to retrieve this.  Basically I had to create an AssemblyInfo.vb file in the project’s App_Code folder that contains the following:

Imports System.Reflection

 

<Assembly: AssemblyTitle(“Program Title”)>

<Assembly: AssemblyDescription(“Written by Chris Nelms”)>

<Assembly: AssemblyCompany(“My Company Limited”)>

<Assembly: AssemblyVersion(“2.0.*”)>

Then in the Page_Load event of my web form (or anywhere else) I insert these two lines of code:

Dim MyAssembly As System.Reflection.Assembly = System.Reflection.Assembly.Load(“App_Code”)

Dim strVersion As String = MyAssembly.GetName.Version.ToString

That’s all there is to it!

Making fitted wardrobes (part 2)

Posted on January 7th, 2007 in House renovation by chris

It’s been a busy weekend and I haven’t been able to devote the time I wanted to these wardrobes.  Nevertheless here I am on Sunday evening and I’ve just finished fitting the door to the little top cupboard.  I still have a couple of hours of final sanding and adjusting, and then I shall declare this wardrobe finished.  The sad thing is that I then have to repeat the whole process by making another matching wardrobe in the alcove on the other side of the bedroom entrance door.

The left-hand wardobe with the doors closed    The left-hand wardobe with the doors open

Turning Autocomplete off

Posted on January 5th, 2007 in Software development by chris

This is the first of several oddments that I shall save here for future reference.  They are mainly snippets of code that I spent half an hour hunting to find, and don’t want to have to repeat the search again.  I used to keep these on a website at VBsampler.net but now that I’m posting this blog on a more or less regular basis it seems the more logical place to save them.

In this case I wanted to find a way to turn off the Autocomplete facility offered by Internet Explorer (and presumably other web browsers too) whereby the user is prompted with previous values they entered into a text box.  Useful at home when you repeatedly enter your name or address but less so on a business application when different customers’ details are being entered each time.

The solution is as follows:

<form id=”form1″ runat=”server” autocomplete=”off”>

This works on an ASP.NET 2.0 Master Page so that I can disable Autocomplete for a complete web app if I wish.

Making fitted wardrobes

Posted on January 1st, 2007 in House renovation by chris

The wardrobe frame on 29th December 2006I took the days between Christmas and the New Year as holiday from work and have spent most of it making wardrobes to go in the alcoves on either side of the entrance door to our new bedroom in the roofspace of the old stable that we had renovated and converted last year.  When they were making all the doors, windows, and other custom joinery last year our builders offered to make ‘his and hers’ wardrobe doors here, but they quoted £1,560 + VAT to supply and fit the doors, and this wouldn’t have included any internal fitments such as shelves or hanging rails.  So we declined and I decided to make them myself when I could spare the time.  I had hoped to complete the entire job during this Christmas holiday but it has taken much longer than I expected and I haven’t even completed the first one.  This first photo shows the basic frame that I made on 29th December.

The remaining photos show the progress by mid-morning today.  I still need to make a cupboard door for the recess above the wardrobe, and then I must start on the matching wardrobe on the other side of the entrance to the bedroom.  Hopefully this will be much quicker because I have now solved most of the tricky problems.  Before I started I didn’t make detailed drawings; instead I sketched out my ideas and got Louise’s approval, and then made it up as I went along.

The wardrobe frame on 29th December 2006 The wardrobe on 1st January 2007
The wardrobe on 1st January 2007 The wardrobe on 1st January 2007