Torna al Thread
<%@ Page Language="VB" AutoEventWireup="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit
If Not String.IsNullOrEmpty(Request.QueryString("tema")) Then
Me.Theme = Request.QueryString("tema")
End If
End Sub
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs)
Response.Redirect(Request.Url.LocalPath + "?tema=" + DropDownList1.SelectedItem.Value)
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:DropDownList ID="DropDownList1" runat="server"
AutoPostBack="True" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"
EnableViewState="true" >
<asp:ListItem Value="" >nessuno</asp:ListItem>
<asp:ListItem>blue</asp:ListItem>
<asp:ListItem>red</asp:ListItem>
</asp:DropDownList></div>
</form>
</body>
</html>