For visual elements that you re-use often, think about placing them into a user control (.ascx) that you can then include into one or more pages. You can add properties to a user control that, if marked public, can be used to pass data into a user control,
such as how many grid rows to return so you can customize based on the page without re-writing your user control.
Don't forget to mark useful responses as Answer if they helped you towards a solution.
Marked as answer by MJEdelman on Jul 23, 2012 06:15 PM
markfitzme
Star
14471 Points
2236 Posts
Re: Best Way To Re-Use Code?
May 28, 2012 07:13 PM|LINK
For visual elements that you re-use often, think about placing them into a user control (.ascx) that you can then include into one or more pages. You can add properties to a user control that, if marked public, can be used to pass data into a user control, such as how many grid rows to return so you can customize based on the page without re-writing your user control.