I assume that you are using ASP.Net 1.1
In that case, create a base-page class. Right now, all 50 pages would
be having 50 different classes from which the aspx-pages inherit.
Make a base class, like BasePage. Here's the final hierarchy:
BasePage : System.Web.UI.Page
-- override PreRender (common functionality for DataGrid)
SomePage : BasePage
-- override PreRender (specific to this page. Don't forget to call
base.PreRender)
somePage.aspx inherits "SomePage" (using <%@ Page ... %> directive).
HTH
--
Cheers,
Gaurav Vaish
http://mastergaurav.blogspot.com http://mastergaurav.org
-------------------