I was recently tasked with adding estimated ship time support to the store. This project includes a form for entering an estimated ship time that would send out an email and a place the estimated ship date on the orderframe.aspx page to show what the last-emailed value was. Well, I would like to suggest a change to the orderframe.aspx page that would make maintenance of that page much easier.

  1. Instead of putting a comment where there is a new part of the table to be created, how about making that another function that is called. This way the entire code file wouldn't be one giant 1,600+ line Page_Load function.
  2. Instead of building a string of HTML code, why not use the various classes that .Net comes with for building pages like the TableRow and TableCall classes.


Honestly, it would be much appreciated if you would change your entire code-base to never emit HTML as a string and instead use the proper classes for doing such things. The way things are done now is prone to bugs, is very difficult to maintain, virtually impossible to read, and prevents VS2010 from checking over the code for compliance with standards and from adding Intellisense to the code.

I would suggest that every page you touch from now on you make sure it doesn't build HTML using strings. It may add a little time to the modification of each page you touch, but after a short time I'm sure many of the pages would end up being touched and thus being fixed of this really bad design practice. Clean up that code debt...after all nobody likes debt!