Naomi,
I come from the WinForms world rather than web forms, but I doubt if the class and sub-class concept is any different between the two ... although the mechanics of how to do it might be different between the two, so don't ask me *how* to it with web stuff. <g>
Yes, you should have a base class for your grid ... that's where that RowCreated method should go. And yes, for your two different pages, I'd have one page that's sub-classed from the other. Maybe you only need a method or a property on the parent page for setting the datasource of the grid.
~~Bonnie
>Hi everybody,
>
>I'm wondering how we should approach this problem in .NET.
>
>I have two very similar WEB pages (in fact, I created the second Page by just copying the first and then making the changes).
>
>These two pages have the GridView which is the same in appearance (HTML) and Events except for the DataSource.
>
>In VFP I would simply save this grid as a class and figure out a way to use different Data Source.
>
>What are my options in .NET and how can I convert this GridView into the common control?
>
>Also I added some code in RowCreated method that highlights the GridView record on mouseover. I'd like to somehow carry this functionality to all Grids used in the application (the pages are already designed).
>
>How should I approach this problem?
>
>Thanks a lot in advance for the ideas and some guidance.