I've been using ASP.NET (C#) for the past two years. I have learned so much but there is still much more to learn :)
I've used MasterPages, 'Web User Controls' for things like headers, navigation, footers etc.
One thing I have never truly understood is the practice of using 'Web User Controls' for your content and logic;
Home.aspx ------ Home.ascx
AboutUs.aspx ----- AboutUs.ascx
Ordering.aspx ---- Ordering.acsx
I've been working with a few projects over the last few months that use this structure. I am aware that this is actually common practice but I don't really understand the full benefits.
I remember when I tried this approach before and ended up having awful viewstate problems with controls like the Gridview... once I took all the logic out and placed it into a .aspx page everything worked fine.
I realise now that maybe I needed to add the Gridview to the viewstate collection... but this only reinforces my difficulty into understanding why this approach is used - given the viewstate problem.
I fully understand the advantages of 'Web User Controls' in relation to things like Headers, menus, footers etc... anywhere that involves duplication but the projects I've seen have pages/controls that are pretty specific - in other words its unlikely to be reused anywhere else - the aspx page just contains a control (.ascx) with the content and logic and it will only be used on that page, nowhere else.
Ignoring 'Code Reuse', what other benefits does this approach provide?