How can I show a aspx page from another web application

I need to show a webapplication that as aspx page without master page in a diferent webapplication.

I want to reference the webapplication and show it programaticaly using the master page of the calling webapplication.

Thanks,
Luis
girosoftAsked:
Who is Participating?
 
khairilConnect With a Mentor Commented:
Hi,

Sorry different GMT.

You can do make a references but instead of making the webapplication2 as different application you may want to extract the main content into a web user control. Then both the webapplication1 and webapplication2 can use this user control, when changes happen to this user control it will change at both places.

If you never use web user control before, it is like an OCX that can be use in various VB application, Delphi and other language that can support it. Here some info and steps to create web user control, http://msdn.microsoft.com/en-us/library/aa984211(v=vs.71).aspx it is for VS 2005 but I think you can use it with VS 2008 too.

However, the simples way is to progmatically change the Master Page like the link I show you before, you might need to consider where your application reside so that you can access master pages you need easily from you application.

There is another technique, you can make calling Web Application2 as iFrame. You can call any web page using iframe and pass any parameter thru URL (Get Method/Query string). Most modern broswer support iframe. There are debates on whether is using iframe is good or bad, but in this situation it might be a solution.

The next solution I going to list here is using "include file", it is unfamous way to do insertion of other file to currently requested page. In most condition in .net application, it is wise to use web user control instead of "include file". However, you might want to have a look on it, http://msdn.microsoft.com/en-us/library/aa479009.aspx
0
 
khairilCommented:
Hi,

The easiest way is to have same page, one without tiding to master page and one with.

The other ways to do:
1. Received special parameter from query string and programme your MASTER PAGE to render page different, like hiding drop menu or remove CSS, or any other UI element you wish to handle.

2. Make you page as web compnent, use the component in current web application (even with master page) and also in other page of other web application.

If you like to specify your master page programmatically then this article will help you, http://www.asp.net/master-pages/tutorials/specifying-the-master-page-programmatically-cs
0
 
ivan_vaguninCommented:
Hi! Unfortunately this can't be done without changing original page (the one that does not have master page) markup. The problem is markup for page with master page and page without master differs. Pages with Master page can have only <asp:Content > tags at top level. And while you can set master page programmatically, the page should have proper markup for that.
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
girosoftAuthor Commented:
Hello,

The link was usefull but I need to clarify my question.

I have 2 projects asp.net:
webapplication1 (contains the site with a master page that is used in all pages)
webapplication2 (contains a page that makes some work dependent on the info inserted)

I want to show webaplication2 page when Im runing webapplication1 and I want it to look as part of webapplication1 and if possible pass information to and from webapplication2.

I guessed the best way is using a reference and addressing the properties and methods of webapplication2 but I couldn't find the way to do it.

Thanks,
Luis
0
 
girosoftAuthor Commented:
I'm new to this, do you khairil see me comment?
0
 
girosoftAuthor Commented:
The best for me is create the library with webcontrols, Im going to use the link provided to try that,.

Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.