Solved

How can I show a aspx page from another web application

Posted on 2011-09-17
6
320 Views
Last Modified: 2012-05-12
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
0
Comment
Question by:girosoft
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 13

Expert Comment

by:khairil
ID: 36553623
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
 
LVL 18

Expert Comment

by:ivan_vagunin
ID: 36553690
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
 

Author Comment

by:girosoft
ID: 36553697
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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 

Author Comment

by:girosoft
ID: 36553867
I'm new to this, do you khairil see me comment?
0
 
LVL 13

Accepted Solution

by:
khairil earned 500 total points
ID: 36554723
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
 

Author Closing Comment

by:girosoft
ID: 36557583
The best for me is create the library with webcontrols, Im going to use the link provided to try that,.

Thanks.
0

Featured Post

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question