ASP.NET

Building javascript minification into MSBuild scripts on 29 Aug 09 (Add comment)

How to use a tool called Packer.NET to build javascript minification into a MSBuild script.

Improving the way ASP.NET handles 404 requests on 11 Feb 09 (2 comments)

How (and why) to make your ASP.NET site’s error handling better by returning the right response codes and redirecting to the error page without changing the url.

Svelte asp.net: avoiding <form runat="server"> on 08 Feb 09 (1 comment)

postbacks add a lot of weight to your page and you don’t always need them. Find out when you can do without them and how to use ASP.NET without paying the postback price.

Reducing viewstate on custom controls on 01 Feb 09 (Add comment)

One of the biggest waste I see in using viewstate is that it persists values that are already set in the aspx. These get set every time that the page runs and don’t need to be round tripped to the browser so that they will be persisted. I did a little experiment a while back […]

IButtonControl – any button will do on 30 Jun 08 (Add comment)

One nice feature of ASP.NET 2.0 is a new interface called IButtonControl. You can use it in a code behind to say a control needs to be a button but without actually saying whether it needs to be a Button, LinkButton, ImageButton or custom control button type. This is the type of thing that’s useful […]

Validating your pages (the technical bit) on 13 Jan 08 (3 comments)

So hopefully now you’re convinced that validation is A Good Thing, have decided which doctype you’re going to use and have resolved never to use quirks mode again. Check, check, check. Ok people, that means enough of the talking. We are finally get to the technical stuff: how to validate pages! Validating using the W3C […]

Friends don’t let friends use quirks mode on 07 Jan 08 (2 comments)

Having a doctype in your webpage isn’t just about making your webpage validate. The most important practical reason to include one is to make sure the browsers are rendering in standards compliance mode. Most browsers have two modes for displaying webpages, standards mode and quirks mode. Webpages with a doctype are rendered using standards mode, […]

Choosing a doctype on 31 Dec 07 (13 comments)

So making sure that your webpages validate is important because it will make the pages render more consistently across different browsers, meaning you can spend less time debugging cross browser incompatibility and more time with your loved ones/down the pub/plotting world domination. But what are we going to validate against? The current most popular options […]

Sacrificing the validation goat to the browser gods on 27 Dec 07 (Add comment)

As a web developer, much of my working day is spent at the mercy of browsers. Sometimes it feels like I spend all my time coaxing useful work from bratty children who don’t like to get along. One of the important tools available for convincing the browsers to play nice is HTML and CSS validation. […]

Web Standards for ASP.NET developers on (Add comment)

Find out more about doing web standards compliant development if you develop in asp.net.

Frontpage extensions firewall on 28 Jan 07 (Add comment)

I wanted to set up front page extensions on my machine this week so I could access the web projects I wanted by typing in the url rather than having to pick from the list in IIS which is littered with experiments and sample projects. Lazy but worth it considering how often I have to […]

Using print stylesheets with ASP.NET themes on 16 Oct 06 (5 comments)

Using the @media css declaration to create a print stylesheet when you’re using ASP.NET themes to automatically include stylesheets.

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.

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 […]

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 […]

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 […]

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” […]

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 […]