Share aspx page between projects

We have a solution with multiple web projects, and there are some pages that should be present in several of them. So we'd need some sort of a shared project which contains aspx files, and which can be referenced by other web projects.

Now there are a few implementations out there:

One implementation described by ScottGu which involves building the shared project, and than copying the output aspx into the host project, and referencing the dll of the aspx. This method has the disadvantage that if the apsx gets modified it must been recopied.

Another option, based on David Ebbo's post would be to convert the aspx into ascx-es which can be referenced as custom controls, and than include those custom-control-aspx-es into the host project inside of some placeholder pages. But my concerns are: can all apsx pages transformed into an ascx? I mean there's no Page.LoadComplete event in user controls for example.

And yet another option is to use virtual directories that map into the shared webproject, as described in a Microsoft KB article. The problem again with this method is that the shared aspx-es must be in predefined directories(that is the virtual directory). If the name of virtual directory overlaps a physical directory, the virtual overrides it and no pages from the latter can be used. Is it perhaps possible to merge these two together?

Any thoughts? Thanks in advance P.S. How about debugging the shared pages?

11
задан jaraics 18 October 2012 в 13:06
поделиться

0 ответов

Другие вопросы по тегам:

Похожие вопросы: