D
Daniel Doyle
I have cut my page down to the simple code below.
The problem is when the user selects a number from the list I want this
number to remain selected after the response.redirect, but the first item in
the list is always selected. I have another page that looks the same and
works but I can't understand why this one doesn't.
Please help.
Thanks. Dan.
<%@ Page Language="VB" %>
<script runat="server">
' Insert page code here
'
Private Sub Page_Load (sender As Object, e As System.EventArgs)
If (isPostBack = False) Then
GetRequiNums
Else
response.write ("nothing")
End If
End Sub
Sub GetRequiNums()
response.write ("get requi numbers")
End Sub
Private Sub cboRequiNums_SelectedIndexChanged _
(sender As Object, e As System.EventArgs)
Response.Redirect ("view_requi.aspx?RequiNum=" &
cboRequiNums.SelectedItem.Value)
End Sub
</script>
<html>
<head>
</head>
<body>
<form id="requi_view" runat="server">
<asp:dropdownlist class="dropdownstyle" id="cboRequiNums" runat="server"
width="405" onSelectedIndexChanged="cboRequiNums_SelectedIndexChanged"
autopostback="true">
<asp:ListItem value = "19">19</asp:ListItem>
<asp:ListItem value = "20">20</asp:ListItem>
</aspropDownList>
</form>
</body>
</html>
The problem is when the user selects a number from the list I want this
number to remain selected after the response.redirect, but the first item in
the list is always selected. I have another page that looks the same and
works but I can't understand why this one doesn't.
Please help.
Thanks. Dan.
<%@ Page Language="VB" %>
<script runat="server">
' Insert page code here
'
Private Sub Page_Load (sender As Object, e As System.EventArgs)
If (isPostBack = False) Then
GetRequiNums
Else
response.write ("nothing")
End If
End Sub
Sub GetRequiNums()
response.write ("get requi numbers")
End Sub
Private Sub cboRequiNums_SelectedIndexChanged _
(sender As Object, e As System.EventArgs)
Response.Redirect ("view_requi.aspx?RequiNum=" &
cboRequiNums.SelectedItem.Value)
End Sub
</script>
<html>
<head>
</head>
<body>
<form id="requi_view" runat="server">
<asp:dropdownlist class="dropdownstyle" id="cboRequiNums" runat="server"
width="405" onSelectedIndexChanged="cboRequiNums_SelectedIndexChanged"
autopostback="true">
<asp:ListItem value = "19">19</asp:ListItem>
<asp:ListItem value = "20">20</asp:ListItem>
</aspropDownList>
</form>
</body>
</html>