Jesse L. Zamora
Jesse L. Zamora

Reputation: 107

Sharing page across websites in ASP.NET

Here at our company we are trying to figure out how to create one single page and share it across domains in ASP.NET.

We would like to create a simple "cart" page that is the same for all of our clients websites, so that we can include the page from a central location (such as http://ourwebsite.com/thecart.aspx) without duplicating code, and still be able to apply the CSS styles and branding for each client to the page.

How can we share a single page across websites in ASP.NET?

Each of our client's websites are on a different domain, and in some cases may also be on different servers as well.

Upvotes: 3

Views: 155

Answers (2)

Jonathan Schroeder
Jonathan Schroeder

Reputation: 51

I think what you want to do is manage one page and have it automatically update the other pages on your client's sites, ideally the same thing as "sharing a resource" no? For that you don't necessarily need to "share" a page, you need an easy process for multiple site deployment of just the single page, errr....I think? In any case, without loading the page via an iframe, or creating a central spot like "cart.somedomain.net" and then pushing the info back and fourth (I assume you'll have shopping cart items), you'd need a way to automate the publish of the page on different sites.

Even if you were to make the "cart" page it's own solution and then just include it in the individual sites, you'd still have the deployment issue. I think you have a few options, some of them previously mentioned:

  1. Create an iframe that loads the page from an external source.
  2. Create a central location for all the domains to push information to for their checkout process (store.somedomain.net or somdomain.net/cart.aspx) and handle it accordingly.
  3. Create an application or script that automates the deployment of the updated resource to multiple sites (I don't know of a tool that does this or I would offer up the name to you, I apologize).

Anyway, I hope that helps, best of luck.

Upvotes: 2

IrishChieftain
IrishChieftain

Reputation: 15253

Inherit from and create the page as just another server control in a custom library. You'll of course have it in source control.

In fact, it doesn't need to be a "page", rather a custom server shopping cart control.

Upvotes: 1

Related Questions