<%@ Page EnableSessionState="false" %>
<html>
<head>
<title>AdRotator Control: Filtering Ads by Keyword</title>
<link rel="stylesheet" href="/shared/netdemos.css">
<script language="C#" runat="server">
void getBook ( Object src, EventArgs e ) {
string key = keyFilter.SelectedValue;
book.KeywordFilter = key;
book.Visible = true;
string txt = ( keyFilter.SelectedItem.Text == "C#" ) ?
"C sharp" : keyFilter.SelectedItem.Text;
msg.Text="<a target='_blank' href='http://www.amazon.com/exec/obidos/external-search?tag=rvnunz0525-20&mode=books&keyword=" + txt + "'>Check out other " + keyFilter.SelectedItem.Text + " books at Amazon</a>";
}
</script>
</head>
<body>
<!-- #include virtual="~/shared/top.inc -->
<div class="header"><h2>AdRotator Control: Filtering Ads by <span class="hilite">Keyword</span></h2></div>
<hr size=1 width=92%>
<div align="center">
<form runat="server">
<p>Select subject:
<asp:dropdownlist id="keyFilter" width=100 runat="server"
autopostback onSelectedIndexChanged="getBook">
<asp:listitem value="aspnet" text="ASP.NET" />
<asp:listitem value="adonet" text="ADO.NET" />
<asp:listitem value="csharp" text="C#" />
<asp:listitem value="vbnet" text="VB.NET" />
<asp:listitem value="xml" text="XML" />
</asp:dropdownlist>
<p><asp:adrotator id="book" runat="server"
target="_blank" height=140
advertisementfile="~/shared/books.xml"
bordercolor="silver" borderwidth=1 />
<p><asp:label id="msg" runat="server"
text="Select subject to check out other books." />
</form>
</div>
<hr size=1 width=92%>
<!-- #include virtual="~/shared/viewsrc.inc" -->
</body>
</html>