Solved

How can I show a aspx page from another web application

Posted on 2011-09-17
6
280 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
  • 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now