Hi,
I work on asp.net applications 'in-house' and would love to use asp.net mvc, but am not able to as our applications are deployed to web servers that are not in our control and currently only have .net framework v2 and IIS6. As well as there being no possibility of having time/money spent on converting current WebForms applications...
So any information to help me create better WebForms asp.net applications would be greatly appreciated...I've read the "what sucks" list about WebForms from the MVC people for which surely there are solutions/work-arounds to make WebForms "less sucky"...
stuff that I sort of understand that could be improved (but need help on):
- remove viewstate for pages that do not postback (remove the runat="server" tag?)
- minimise usage of viewstate - using
<span><asp:literal /></span>
instead of an asp:label (we never use the style properties of server side controls but use the CssClass attribute mainly to keep CSS in the CSS files) - use ashx handlers for ajax requests (can this be furtherd?? e.g. a postback to a handler?)
- can viewstate be removed completely and still postback? (is it reading the form variables instead of reading control values?)
- can you turn off the viewstate programmatically if you know the user has javascript? e.g. then an ajax request can submit the form but will work if javascript disabled?
- we already keep all our business logic in a BR/BL layer and we have a similar DAL layer for database access...so aspx code behind is generally fairly light...(validation is also in the BR/BL so that responding to an ajax request or a postback for the same task requires little (or no) duplication of code)
- use of less components...(less server controls...to some degree this also means using controls that won't have the crap IDs)
i don't really care for the neatly formatted URLs as its intranet based (and so pretty much irrelevant) and SEO is of no concern...even though the MVC urls look brilliant...
Again, any help, resources, code samples or whatever would be awesome! thanks heaps.