T4Configuration: Small July Update

T4Configuration is a T4 template that generates a static class with methods derived for the appSettings and connectionStrings sections of either your Web.Config or your App.Config files.

I made a small update that lets the namespace be derived from Visual Studio 2010 assemblies instead of the reliance on the third-party T4 Toolbox. This should fix it not working if the user does not have it installed (Doh!).

Continue reading ‘T4Configuration: Small July Update’

jQuery UI: Using Autocomplete with Tabs

I was working on a project that happened to have the need to embed a jQuery UI Autocomplete textbox within a Tab container. Normally fine and easy thing to do, however I also needed to override the Autocomplete’s private function  _renderItem property so I could template my own html to display. The problem was that when the Autocomplete would kick in it would drop the contents of it’s drop down to every <ul> with jQuery UI classes it could find and being inside the Tab control that was a few, this was not the effect I desired. Continue reading ‘jQuery UI: Using Autocomplete with Tabs’

T4Configuration: Automated .Config settings

UPDATE: T4Configuration has been updated see here for info.

UPDATE: Source code is available at https://github.com/tornal/T4Configuration

I have created a quick and dirty T4 script to run in Microsoft Visual Studio that will automatically generate a static C# class with properties for every <appSetting> and <connectionString>. You can then access them like so:

 1: String conn = Config.MyDataContext;

Not a million miles away from how T4MVC works.

It is a simple little utility that I hope automates something a lot of us do or have built a shared library to do.

Source code will follow soon. Its all on a BSD do what you will license.

Get it through Nuget or type “Install-Package T4Configuration” in your package manager console.

 

Sql Server 2008+: Declare and Assign Variables

This information is purely extracted from Pinal Dave so go there for the source. It’s one of those things that I deal with TSQL as a programmer and not as a DBA. I don’t keep up with these little advancements in the language as SQL Server increases in versions as much as I should and I wouldn’t have caught this if I didn’t follow Pinal’s blog.

Basically ye old way this was done and what I was doing until today was:

   1: DECLARE @example int 

   2: SELECT @example = 1

Since SQL Server 2008 you can now do it like:

   1: DECLARE @example int = 1

Simple, but from my background it is easier to read. Thanks Pinal!

Report Viewer Control 2010 – Setting height to browser window across multiple browsers

When you add a Report Viewer control to your Asp.Net site the height will default to 400 pixels. In many situations you want the control to automatically fill to either the browser window or at least its containing block element. Setting it to 100% works for width but will not work for height. This is down to the DOCTYPE of the web page specifying XHTML and 100% height for the table is an illegal attribute.

Continue reading ‘Report Viewer Control 2010 – Setting height to browser window across multiple browsers’

The request failed with HTTP status 504: Proxy Timeout

This is the error I kept getting while testing my web service that synced data from my intranet to the internet facing database. I *was* testing it between two servers on the intranet and however I optimised my datalayer it wouldn’t go away when syncing table’s that were quite big.

Continue reading ‘The request failed with HTTP status 504: Proxy Timeout’

Dragon Age: Origins

My character Wrivithrie

Meet Wrivthrie, this unassuming city elf was minding his own business until tasked with saving the world, as you do. This is the world according to Bioware in there latest fantasy epic Dragon Age: Origins.

They also have another game out you might have heard of but I will deal with that later.

Continue reading ‘Dragon Age: Origins’

Installing Paint.Net on Windows 7

The latest and greatest version of Paint.Net (v3.5.1) has been released and is awesome. If your running Windows 7 you may come across an issue when you install it namely it thinks .NET 3.5 SP1 isn’t installed and quickly bumps you off to the download from Microsoft. This is a tad annoying as Windows 7 comes preinstalled with this edition of .NET.

Continue reading ‘Installing Paint.Net on Windows 7’

Sql Server 2008 Business Intelligence Studio Fails On Install

I happened to be reinstalling my Windows 7 Professional work machine when I came to this error installing the shared features on Sql Server 2008 Standard. Everything else installed fine but the Business Intelligence Studio was refusing to play ball.

Continue reading ‘Sql Server 2008 Business Intelligence Studio Fails On Install’

Website Compression: Check ISA 2004

So you have checked the HTTP Headers being sent by your browser and you have confirmed it is sending the ACCEPT-ENCODING header but still the response from IIS (7 in my case) has no CONTENT-ENCODING and your stumped?

Continue reading ‘Website Compression: Check ISA 2004’