Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class or User Control or what?
Message
From
10/05/2008 10:36:18
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01316015
Message ID:
01316222
Views:
15
This message has been marked as a message which has helped to the initial question of the thread.
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.
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform