Monday 23 March 2009

ASP Controls

Controls in ASP are amazing and very useful to use if used in the correct way. One of the nice things about custom controls is that if you have generic functionality across multiple pages, then a nice little feature is to create a custom control and embed that on your pages. This means it's easy to maintain and you're not having to duplicate the same code across pages.

Two annoying things I have found:

1) Developers who create a control and it is only ever used once on one page. Why do this if the functionality is not generic and used across multiple pages? Why not use the .aspx page and write the code directly onto the page.

2) Spaghetti code, where you have a page which has a control, that control contains a control and that control contains a control. It is so hard to maintain or debug this!

Controls are nice to use, I just wish people would learn to do so properly!

1 comment:

Search This Blog