I'm trying to include a common navigation page into each aspx page. The code looks something like this:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="canada_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<%
Response.WriteFile("../include/navigation.aspx");
%>
</div>
</form>
Here is the navigation.aspx code:
<form id="form1" runat="server">
<div>
<asp:DropDownList ID="ddlSites" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlSites_SelectedIndexChanged">
<asp:ListItem Selected="True" Text="Global websites" Value="" />
<asp:ListItem Text="Australia" Value="" />
<asp:ListItem Text="Canada" Value="" />
<asp:ListItem Text="Ireland" Value="" />
<asp:ListItem Text="Japan" Value="" />
<asp:ListItem Text="Latin America and the Caribbean" Value="" />
<asp:ListItem Text="Middle East" Value="" />
<asp:ListItem Text="New Zealand" Value="" />
<asp:ListItem Text="Portugal" Value="" />
<asp:ListItem Text="Singapore" Value="" />
<asp:ListItem Text="Spain" Value="" />
<asp:ListItem Text="United Kingdom" Value="" />
<asp:ListItem Text="United States" Value="" />
</asp:DropDownList>
The dropdownlist is not displaying in the browser. I know one way is to use a Master page (which I plan on doing one day), but for this project, I would like to do something simple like this -- it's crude but functional.
Thanks for your help!