petela
12-14-2004, 12:56 AM
Hi,
I want to use a drop-down list in ASP.NET. When the user hits the go or submit button, I want to send them to another page. I cannot seem to get this to work properly. Here is my code:
--------------------------------------------------------
<%@ Page Language="C#" %>
<HTML>
<HEAD>
<title></title>
<script language="C#" runat="server">
</script>
<meta content="Microsoft Visual Studio .NET 7.1" name=GENERATOR>
<meta content=VisualStudio.HTML name=ProgId>
<meta content="Microsoft Visual Studio .NET 7.1" name=Originator>
<LINK href="../bridgeport/main/main.css" type=text/css rel=stylesheet >
<LINK href="../bridgeport/albumpage/album.css" type=text/css rel=stylesheet >
<script src="../bridgeport/main/main.js"></script>
</HEAD>
<body>
<!--#include file="layout.aspx"-->
<div id="SearchByYear">
<form runat="server" method="post" action="process.aspx">
<asp:dropdownlist id="AlbumDropDown" runat="server">
<asp:ListItem>2003</asp:ListItem>
<asp:ListItem>2002</asp:ListItem>
<asp:ListItem>2001</asp:ListItem>
<asp:ListItem>2000</asp:ListItem>
<asp:ListItem>1999</asp:ListItem>
<asp:ListItem>1998</asp:ListItem>
<asp:ListItem>1997</asp:ListItem>
</asp:dropdownlist>
<input type="submit" value="Submit">
</FORM></DIV>
</body>
</HTML>
----------------------------------------------------
When I use this code and hit the submit button, it does not redirect me
to the "process.aspx page". Instead, it refreshes the same page that the form is on. Any ideas?
Thanks,
petela
I want to use a drop-down list in ASP.NET. When the user hits the go or submit button, I want to send them to another page. I cannot seem to get this to work properly. Here is my code:
--------------------------------------------------------
<%@ Page Language="C#" %>
<HTML>
<HEAD>
<title></title>
<script language="C#" runat="server">
</script>
<meta content="Microsoft Visual Studio .NET 7.1" name=GENERATOR>
<meta content=VisualStudio.HTML name=ProgId>
<meta content="Microsoft Visual Studio .NET 7.1" name=Originator>
<LINK href="../bridgeport/main/main.css" type=text/css rel=stylesheet >
<LINK href="../bridgeport/albumpage/album.css" type=text/css rel=stylesheet >
<script src="../bridgeport/main/main.js"></script>
</HEAD>
<body>
<!--#include file="layout.aspx"-->
<div id="SearchByYear">
<form runat="server" method="post" action="process.aspx">
<asp:dropdownlist id="AlbumDropDown" runat="server">
<asp:ListItem>2003</asp:ListItem>
<asp:ListItem>2002</asp:ListItem>
<asp:ListItem>2001</asp:ListItem>
<asp:ListItem>2000</asp:ListItem>
<asp:ListItem>1999</asp:ListItem>
<asp:ListItem>1998</asp:ListItem>
<asp:ListItem>1997</asp:ListItem>
</asp:dropdownlist>
<input type="submit" value="Submit">
</FORM></DIV>
</body>
</HTML>
----------------------------------------------------
When I use this code and hit the submit button, it does not redirect me
to the "process.aspx page". Instead, it refreshes the same page that the form is on. Any ideas?
Thanks,
petela