Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How can I show a aspx page from another web application

Posted on 2011-09-17
6
Medium Priority
?
323 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
Understanding Linux Permissions

Linux for beginners: How to view the permissions associated with files and directories and also how you can change them.

 

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 1500 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

661 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