I have an ASP.NET webpage where a user can generate 5 different types of reports.
I was wondering if it is acceptable coding practice to create 5 different .aspx pages with 5 different gridViews.
I know I could use just one .aspx page and generate all 5 gridviews dynamically in the server code, but it seems that from a code maintenance point of view, it would be better to separate the various reports into their own page.
I know this might create some code duplication.
Any thoughts?
You don’t have to duplicate code even if you create multiple pages for your reports. You could just create a business object that contains the code that’s shared among the reports and then the pages would simply implement the specific details.
I’d probably create separate pages for each report – it’s easier to maintain, plus reports have a habit of evolving over time.