Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How can I show a aspx page from another web application

Posted on 2011-09-17
6
Medium Priority
?
328 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
Independent Software Vendors: 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!

 

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Screencast - Getting to Know the Pipeline
Suggested Courses

885 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