Click here to Skip to main content
15,896,606 members
Articles / Web Development / IIS

BooProd.Core - Context sensitive URL

Rate me:
Please Sign up or sign in to vote.
3.80/5 (3 votes)
22 Dec 20047 min read 47.7K   22  
Helps you create context sensitive dynamic URLs: dynamically computed URLs, depending on which server the page is generated on.
<%@ Import Namespace="BooProd.Core" %>
<%@ Page language="c#" Codebehind="MainForm.aspx.cs" AutoEventWireup="false" Inherits="BooProd.Core.TestDynURL.MainForm" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>MainForm</title>
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="C#" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
	</HEAD>
	<body>
		<form id="Form1" method="post" runat="server">
			<P><STRONG><FONT size="6">BooProd.Core</FONT></STRONG></P>
			<TABLE id="Table1" cellSpacing="1" cellPadding="1" width="400" border="1">
				<TR>
					<TD><STRONG>Dynamic Access</STRONG>,<br>
						embeded HTML</TD>
					<TD><%=ExeContext.WebSite("CODEPROJECT").URL%></TD>
				</TR>
				<TR>
					<TD><STRONG>Dynamic Access</STRONG>,<br>
						code behind data binding</TD>
					<TD><asp:label id="LabelWebSite" runat="server" Text="<%# LabelWebSiteBind %>">
						</asp:label></TD>
				</TR>
				<TR>
					<TD><STRONG>Static Access</STRONG>,<br>
						embeded HTML</TD>
					<TD><%=ExecTemplate.WS_CODEPROJECT.URL%></TD>
				</TR>
				<TR>
					<TD><STRONG>Static Access</STRONG>,<br>
						code behind data binding</TD>
					<TD><asp:label id=LabelWebSiteBis runat="server" Text="<%# LabelWebSiteBindBis %>">
						</asp:label></TD>
				</TR>
			</TABLE>
		</form>
		<P>Your are in
			<asp:Label id=LabelEnv runat="server" Text="<%# LabelEnvBind %>">
			</asp:Label>&nbsp;environment.<BR>
			Theses URLs are context sentive and depends on your environment (local or 
			production).</P>
	</body>
</HTML>

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


Written By
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!

Comments and Discussions