Click here to Skip to main content
Click here to Skip to main content
Articles » Web Development » ASP.NET » Samples » Downloads
 
Add your own
alternative version

BooProd.Core - Context sensitive URL

, 22 Dec 2004
Helps you create context sensitive dynamic URLs: dynamically computed URLs, depending on which server the page is generated on.
BooProdDynURL_2004-12-07.zip
BooProd.Core.TestDynURL
BooProd.Core
bin
Release
BooProd.Core.csproj.user
ConfigFiles
Inetpub
wwwroot
BooProd.Core.TestDynURL
bin
BooProd.Core.dll
BooProd.Core.TestDynURL.dll
_vti_cnf
BooProd.Core.dll
BooProd.Core.TestDynURL.dll
BooProd.Core.TestDynURL.csproj.webinfo
Global.asax
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace BooProd.Core.TestDynURL
{
	/// <summary>
	/// 2004-12-06 / CB => First version
	/// </summary>
	public class MainForm : System.Web.UI.Page {
		protected System.Web.UI.WebControls.Label LabelWebSite;
		protected System.Web.UI.WebControls.Label LabelEnv;
		protected System.Web.UI.WebControls.Label LabelWebSiteBis;
	
		#region DATA_BIND
		public string LabelWebSiteBind {
			get { return ExeContext.WebSite("CODEPROJECT").URL; }
		}
		public string LabelEnvBind {
			get { return ExeContext.IsLocal?"Local":"Prod"; }
		}
		public string LabelWebSiteBindBis {
			get { return ExecTemplate.WS_CODEPROJECT.URL; }
		}
		#endregion

		private void Page_Load(object sender, System.EventArgs e)
		{
			// Initialize the package
			ExecTemplate.refresh(Session);

			// Bind all data of the page
			DataBind();
		}

		#region DEFAULT
		override protected void OnInit(EventArgs e)
		{
			InitializeComponent();
			base.OnInit(e);
		}
		
		private void InitializeComponent()
		{    
			this.Load += new System.EventHandler(this.Page_Load);

		}
		#endregion

	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Boo!
Web Developer
France France
I work on a leading European telecom provider regarding on-line real time account management for B2B and B2C customers. Before this position, I worked in one of the leading European council providers of economic forecasts analyses.
 
I jump into software development in 1985 and never stop! I work with a lot of systems like Apple, NeXT, Unix, Windows. I develop with a lot of languages like Assembler, Pascal, C, C++, Java and C#. I play with databases like Oracle and SQL Server. I love networks and like to make systems working and cooperate themselves.
 
I'm very interested in MAS: Multi Agent System and really hope that computer will be human in the future. I work on BDI architecture extensions on this purpose, but this is the project of my life!

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150327.1 | Last Updated 22 Dec 2004
Article Copyright 2004 by Boo!
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid