S
Sean
HI There,
I am trying to submit a form when a selection is made from a dropdown list,
I keep getting the error "Handles clause requires With Events Variable".
Could someone help me with the syntax?
Sean - Thanks in advance
<script language="vb" runat="server">
Private Sub lstRegion_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles lstRegion.SelectedIndexChanged
response.write ("test")
End Sub
</script>
<html>
<body>
<form runat=server>
<ASPropDownList id=lstRegion AutoPostBack="true" name=lstRegion
maxlength= "40" SelectedIndexChanged=lstRegion_SelectedIndexChanged
runat=server>
<asp:ListItem Value="1">New South Wales</asp:ListItem>
<asp:ListItem Value="2">Victoria</asp:ListItem>
<asp:ListItem Value="3">Tasmania</asp:ListItem>
<asp:ListItem Value="4">South Australia</asp:ListItem>
<asp:ListItem Value="5">Western Australia</asp:ListItem>
<asp:ListItem Value="6">Northern Territory</asp:ListItem>
<asp:ListItem Value="7">Queensland</asp:ListItem>
</ASPropDownList>
</form>
</html>
</body>
I am trying to submit a form when a selection is made from a dropdown list,
I keep getting the error "Handles clause requires With Events Variable".
Could someone help me with the syntax?
Sean - Thanks in advance
<script language="vb" runat="server">
Private Sub lstRegion_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles lstRegion.SelectedIndexChanged
response.write ("test")
End Sub
</script>
<html>
<body>
<form runat=server>
<ASPropDownList id=lstRegion AutoPostBack="true" name=lstRegion
maxlength= "40" SelectedIndexChanged=lstRegion_SelectedIndexChanged
runat=server>
<asp:ListItem Value="1">New South Wales</asp:ListItem>
<asp:ListItem Value="2">Victoria</asp:ListItem>
<asp:ListItem Value="3">Tasmania</asp:ListItem>
<asp:ListItem Value="4">South Australia</asp:ListItem>
<asp:ListItem Value="5">Western Australia</asp:ListItem>
<asp:ListItem Value="6">Northern Territory</asp:ListItem>
<asp:ListItem Value="7">Queensland</asp:ListItem>
</ASPropDownList>
</form>
</html>
</body>