tags:

views:

42

answers:

1

I am programming an ASP.NET application that has different modules (each one with different styles and master pages), but there are some pages that I need to share between the modules.

How do I share a page between two different modules in an ASP.NET application?

+2  A: 

This might be a candidate for pulling out the "Search" component of the page into a user control and adding a "Search-Mode" property to it.

You can have different search_X.aspx pages with different output/styling/gridview columns etc...

and you could define your control on each different search page with a different Search-Mode

e.g.

<myctl:Search ID="searchCustomers" runat="server" SearchMode="CustomerPurchases" />

or

<myctl:Search ID="searchCustomers" runat="server" SearchMode="CustomerDetails" />

Then have your page bind to some event on that control that gets back the SearchClause/DataSource etc for binding to your display list

Eoin Campbell
It's a good idea!
Alfred