Posted by: Matthew | January 28, 2008

LINQPad

There is a great tool which is the “Management Studio” equivalent for LINQ. It allows you to build your queries just like you would for SQL, without the need for you to do a lot of setup work trying to test in development code.

http://www.linqpad.net/

There’s support for LINQ to SQL, LINQ to Objects and LINQ to Xml, so it has it all.

For me, the best part is that when you’re building your query, you get that instant feedback on your results. Better still, you can view the results of your query in SQL! For old Sql hats like myself, this is quite comforting :)

Posted by: Matthew | January 27, 2008

LINQ To Sql ‘book’ from Scott Guthrie

Scott Guthrie recently wrote a series of blog posts about the new LINQ To Sql features of VS2008. I’ve recently had the opportunity to use this technology for the first time in commercial code and found the posts a valuable resource. To save the hassle of browsing around the blog however, Kadir Pekel placed the whole series (all 9 parts) into a handy pdf file.

http://it-box.blogturk.net/2007/10/19/linq-to-sql-tutorial-series-by-scott-guthrie-pdf-book-format/

It’s easy reading, highlighting each aspect of LINQ To Sql: how it works; how to customize it; and where best to use it. When reading ‘cover-to-cover’ you can see there is a fair chuck of repetition in between the sections, but then that just helps it work well as a quick reference guide.  LINQ To Sql itself is going to vastly improve my current development projects, especially with it’s simple ability to page efficiently over large amounts of data (a hassle to do in Sql once you factor in what column you are ordering by).

Posted by: Matthew | January 16, 2008

Create nice buttons in CSS

It’s always nice when a website looks good consistently across all browsers and OS. One problem is that buttons (input type=”button”) are rendered native to the OS so a site that uses normal buttons in IE7 on Vista looks great, but when viewed in IE6 on Windows XP, they look drab and bland … definitely not what you intended for you look-and-feel.

A good solution is to style anchor tags to look and feel like a button. An awesome example can be found at Oscar Alexander’s blog, using CSS techniques to alter the background images. It’s well worth a look.

Posted by: Matthew | January 14, 2008

Blog at a new home

The orginal blog was running dasBlog, but there has been so many problems with it running in medium trust on a shared server, that I have given up! It’s been a long while between posts due to all these problems, so now it should be back to plain sailing.

 It may take a while, but I will try and get the old posts moved over, but no promises :)

Posted by: pureblue | December 7, 2007

Showing column headers in GridView even if no data found

When using the GridView, you can specify an “EmptyDataTemplate” to display when there is no data specified in the DataSource. This is great, but the problem from my point of view is that the column headers are not displayed. I would like them to be displayed, even if there is no data.

In my search for the solution I found the following article which explains how to achieve this result by overriding CreateChildControls:

http://www.dotnetslackers.com/GridView/re-27953_Displaying_GridView_When_No_Data_Exists.aspx

Posted by: pureblue | April 11, 2007

Expression available in MSDN Subscriptions

It always seemed a little strange to me that the new Expression Web and Blend tools would not be available under a MSDN Subscription … after all, they are still development tools at heart.

Well Microsoft is, from now, adding these two tools to the MSDN Premium subscribtion, which was apparently inspired by customer feedback!

As announced on Somasegar’s WebLog:

“Expression Blend and Expression Web are intended to help creative professionals collaborate with developers to create rich user experiences for the Web, Windows Vista applications and beyond, which means we need to make sure both tools are readily available to our developer community.”

The offer excludes Expression Design and Expression Media as they “… are not directly intended for application development, we feel they fall outside the current scope of MSDN Subscriptions”. Fair enough.

Posted by: pureblue | April 2, 2007

IE – “Postback when Enter pressed” bug!

I’ve just fixed a strange bug I was having when comparing a web page in IE and Firefox. The page simply had a single textbox, and a button. By default, in accordance with W3C standards, both browsers will post-back to the server when the user hits <Enter> from within the textbox.

Just the behaviour I wanted, except that when the post-back occurs from IE, the button’s event handler does not get triggered on the server!! Very strange … but this article on 4guysfromrolla.com gives a great explanation.

Basically, IE does not post-back a fully serialised form if there is only one textbox on the page! The server does not know what triggered the post-back and so cannot call the correct server-side event handler. The workaround? … add another textbox to the form (but just make it hidden!).

This is true for IE6 and IE7 …

Update 5 APR 2008: An example would be nice, so this is what I used…

<asp:TextBox ID=”IEPostbackBugFix” runat=”server” style=”visibility:hidden;display:none;” />

Posted by: pureblue | March 26, 2007

Create a “Wait Image” for your AJAX applications

I wanted an animated give for an AJAX application I am working on and was struggling to find anything until I stumbled upon http://www.ajaxload.info. Very simple site (work in progress?) but it gave just enough options to create just the “Wait Image” I needed.

Posted by: pureblue | February 20, 2007

Getting Real – By 37signals

I’ve looked at used some of the online tools from 37signals, such as Writeboard, Ta-da List and Backpack, and so I was interested to learn that they’ve written a book about their philosophy and company ideas. The basic theme is how to start out in a new technology venture, using the contrarian approach of providing less, releasing early, and above all – staying small.

“All the cash, all the marketing, all the people in the world can’t buy the agility you get from being small.”

The book is available online here. You can also pay US$19 to get a copy in pdf or US$29 for a paperpack copy. The online content is exactly the same as the printed version, which I’m actually contemplating purchasing … I always find it easier to make my notes directly in the book :)

“Keep it small. Keep it simple. Let it happen.”

Posted by: pureblue | February 19, 2007

Authoring Sidebar Gadgets in C#

I’ve been meaning to look more into building a Sidebar Gadget in Vista for a while now. I just happened to come across a post from Nikhil Kothari’s blog entitled Authoring Sidebar Gadgets in C#. I don’t really have the time to the follow longer, in-depth tutorials you see around and was interested to see how his Script# project allowed the use of C# when building a Gadget. Worth a closer look I think.

« Newer Posts - Older Posts »

Categories

Follow

Get every new post delivered to your Inbox.