.NET

UserControl template areas on 10 Jun 06 (1 comment)

ASP.NET smartie pants Scott Guthrie has linked to a really interesting article about supporting templated areas in ASP.NET controls. This is aimed at people doing user controls, but the same thing will work if you want to have a templated area in your own custom control. I’ve created a little sample that shows how to […]

You don't have to register web controls and user controls on every page! on 01 May 06 (Add comment)

One of the coolest things I learnt lately thanks to Dino Esposito’s excellent Atlas talk that I went to in Nice was that you can register your user controls and web controls in one place in the web.config file rather than at the top of every page. You just need to add a <controls> tag […]

Joe's new ASP.NET blog on 16 Apr 06 (Add comment)

My boyfriend Joe (who’s also an ASP.NET programmer) has a new techblog! Go read about how excited he is about his new Porsche. ;) Now he has to link back to me! Can you believe I had to tell him to?!

Bookmark: tips for debugging atlas applications on 12 Apr 06 (Add comment)

If you’re doing any work with the Atlas beta there’s a nice page in the documentation with tips on debugging atlas applications. Some of the tips are actually quite useful for general clientside debugging as well so it’s worth a read even if you’re not using Atlas.

Bookmark: ASP.NET DataBinding internals on 10 Apr 06 (Add comment)

I found a very interesting article about ASP.NET data binding that talks about exactly what’s happening when you call the DataBind() method on a templated control like the repeater. It’s got some really interesting stuff on how the templates are instantiated and how the child controls are built.

Pausing page rendering at a certain point on 07 Apr 06 (Add comment)

I don’t know if this will be useful to anyone else but I thought this was kind of a neat trick for messing around with ASP.NET page rendering for debugging purposes. My problem was I wanted to stop the rendering of a page at a certain point so I could see how the scripts were […]

UserControl type not available if code behind file isn't in app_code directory on 06 Apr 06 (2 comments)

I ran into a weird problem with dynamically created ASP.NET 2.0 user controls yesterday. I was using the user control to populate a panel of a tab control which meant I didn’t actually have a reference to the user control object anywhere on my form. The only way I could get a reference to it […]

Property grid usability on 05 Apr 06 (Add comment)

There’s a lovely rant on property grids on the VirtualDub website. To be honest, I’ve never really thought that much about property grids but I can see where the article is coming from. Visual Studio is the only program I use that has them and scrolling through the grid trying to find the property I […]

Bookmark: BTSharp BitTorrent library for .NET on 31 Mar 06 (5 comments)

I’ve been going through my email finding all the interesting links that I’ve sent to myself since Christmas. Here’s a link I found in the depths of my inbox to a nice looking BitTorrent library for .NET called BTSharp. I actually heard about it through an interesting interview with its creator on DotNetRocks and it […]

Connecting to Amazon Web Service through ASP.NET on 16 Mar 06 (Add comment)

I have had such fun this afternoon! I’ve been creating a little sample application for something I’m doing and I was sick of the Northwind database so I thought I’d try hooking up to the Amazon web service instead (and make fun of David Hasselhof’s 80s movies). I went the VS2005 Web References route and […]

WebResources aren't cached when debug is set to true in your web.config on (Add comment)

On the subject of the ASP.NET 2.0 web resources, something very useful to know is they aren’t cached when debug is set to true in your web.config. My research suggests that regardless of this caching isn’t enabled at all on Cassini (aka the ASP.NET development server). It doesn’t seem to even cache static files and […]

Where has .NET 2.0 been all my life? on 18 Jan 06 (2 comments)

I really like .NET 2.0 and I’m liking it more the more I’m use it. Partial classes! How have I lived without partial classes all these years? It’s a fantastic idea where you’re using generated code like interface code. I’m absolutely itching to try this feature out with CodeSmith when I write my next data […]

Using the ASP.NET 2.0 Web Resource Attribute on 11 Jan 06 (11 comments)

ASP.NET 2.0 has a really nice feature that lets you compile site or component resources like javascript files into your assembly file instead of deploying these shared files to the wwwroot/aspnet_client directory like in ASP.NET 1.x. This makes your component/website much easier to deploy because it means you can keep everything you need in one […]

The resource cannot be found. on (4 comments)

I was playing around with embedded web resources and was having a problem loading some javascript files. When I cut and paste the script link from the source of my page into the browser’s address bar I got the following error message: The resource cannot be found. Description: HTTP 404. The resource you are looking […]

Overview on new features for ASP.NET 2.0 on 22 Nov 05 (2 comments)

I found a pretty cool article on developer fusion with an overview of what’s new in ASP.NET 2.0. It’s a great overview with an overview of things like changes to page state, new design time functionality for server controls, new localization functionality and new page lifecycle events. I promise I’m not blogging this because I […]

HOWTO: Create a web control that handles a postback on 24 Oct 05 (Add comment)

Step 1: Create a WebControl that implements the IPostBackEventHandler interface. In my example I’ve created a CustomButton control that is a HTML <span> element that acts like a real button by trigging a postback and firing a Click event. public class CustomButton : WebControl, IPostBackEventHandler { public CustomButton() { } public void RaisePostBackEvent(string eventArgument) { […]

Where have the web project files gone? on 11 Oct 05 (1 comment)

I’m using ASP.NET 2.0 today to actually try to do something. I’ve opened it up before and had a bit of a look around, but this is the first time I’ve actually needed to make a new project and write a bit of code. I’m trying to breath deeply and tell myself that change isn’t […]

Refactoring tool that looks at C# and aspx files on 01 Oct 05 (Add comment)

Saw an interesting looking refactoring tool called DevAdvantage that looks like it’s a cross between FXCop and Resharper. I haven’t actually taken a look at it yet, but I really liked the fact you could set rules for things in aspx files. I think the fact that aspx files aren’t really treated like “real code” […]

Converting from a string to an enum option on 01 Sep 05 (Add comment)

If you need to convert a string to an enum option, you can convert it using the Enum.Parse() method: Day weekday = (Day) Enum.Parse(typeof(Day), “Wednesday”, true);

Is there javascript debugging in VS.NET 2005? on 12 Aug 05 (Add comment)

I might just be dense, but I can’t find out how to do javascript debugging in VS.NET 2005. It cheerfully informs me that “object is null or not an object” but there’s no script listing or running documents or even line information so I can’t really do much with the information. Does anyone know if […]

Ways to do paging in ASP.NET on 26 Jul 05 (2 comments)

I found this wonderful article that compares the performance of different methods of paging in SQL Server a while back, but it was either eaten when my database got corrupted or I forgot to blog it. The article compares six different types of paging and gives information about the strengths and weaknesses of each. Apart […]

Free MSDN ASP.NET training course on 15 Jul 05 (Add comment)

Saw this a few days ago. It’s a free ASP.NET training course from Microsoft. I’ve only had a quick look, but the content looks quite comprehensive and I think there’s a few things in there I’m going to find quite useful. If you’re interested, sign up soon because I believe it’s a time limited thing.

Creating ASP.NET applications as Class Library project on 13 May 05 (Add comment)

Found an article about how to create ASP.NET applications in VisualStudio without using a web project. You can still have all the neat web project functionality like the wizards, but it makes it much easier to move your projects around (as in a web project the solution won’t even open your web project if IIS […]

Monitoring memory in .NET on 05 May 05 (Add comment)

Had an interesting time today looking at tools to watch memory usage. The most interesting thing I found was an article about finding memory leaks in .NET. It had some good information about how the memory allocation and garbage collection works and links to some good tools for monitoring it. The nicest tool I found […]

WinForm Modal dialogs need to be explicitly disposed on 29 Apr 05 (Add comment)

Came across an interesting problem today. It turns out that WinForm modal dialogs are only hidden once they have been used. You need to explicitly call their Dispose method if you want to mark them for garbage collection. There’s a MSDN page with more information about this.