Files
mono/mcs/class/System.Web.Extensions/Test/AUT/UpdatePanelWalkthrough3/NorthwindTradersMasterPageCS.master
T
Yoni Klain 20a68f3a5f Moved remotely
svn path=/trunk/mcs/; revision=82545
2007-07-24 09:07:30 +00:00

81 lines
2.8 KiB
Plaintext

<!-- <Snippet3> -->
<%@ Master Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected void FeaturedProduct_Click(object sender, EventArgs e)
{
((SqlDataSource)ContentPlaceHolder1.FindControl("SqlDataSource1")).SelectParameters["SearchTerm"].DefaultValue =
Server.HtmlEncode(FeaturedProduct.Text);
((Label)ContentPlaceHolder1.FindControl("Label1")).Text = "Searching for '" +
Server.HtmlEncode(FeaturedProduct.Text) + "'";
((TextBox)ContentPlaceHolder1.FindControl("SearchField")).Text =
FeaturedProduct.Text;
((UpdatePanel)ContentPlaceHolder1.FindControl("UpdatePanel2")).Update();
}
protected void Page_Load(object sender, EventArgs e)
{
ScriptManager1.RegisterAsyncPostBackControl(FeaturedProduct);
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>NorthwindTraders Master Page Example</title>
<style type="text/css">
body {
font-family: Lucida Sans Unicode;
font-size: 10pt;
}
button {
font-family: tahoma;
font-size: 8pt;
}
#masterheader {
height: 40px;
}
#logodiv {
position: absolute;
left: 10px;
}
#menudiv {
position: absolute;
right: 10px;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div id="masterheader">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<div id="logodiv">
<a href="http://www.northwindtraders.com">Northwind Traders</a>
</div>
<div id="menudiv">
<asp:Menu ID="Menu1" runat="server" Orientation="Horizontal">
<Items>
<asp:MenuItem Target="#" Text="Home" Value="Home"></asp:MenuItem>
<asp:MenuItem Target="#" Text="Products" Value="Products"></asp:MenuItem>
<asp:MenuItem Target="#" Text="About" Value="About"></asp:MenuItem>
</Items>
<StaticMenuStyle HorizontalPadding="5px" />
</asp:Menu>
</div>
</div>
<br />
This month's hot item:
<asp:LinkButton ID="FeaturedProduct" runat="server"
OnClick="FeaturedProduct_Click">Pepper Sauce</asp:LinkButton><br />
<hr />
<div id="maincontent">
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
<!-- </Snippet3> -->