combo box not firing SelectedIndexChanged


P

PJ6

OK I have no idea why in the code behind this method is not hit on selection
change -

Private Sub DropDownList1_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
DropDownList1.SelectedIndexChanged
<random code>
End Sub

Any ideas?

TIA,
Paul

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb"
Inherits="TESTWEBAPP.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name=vs_defaultClientScript content="JavaScript">
<meta name=vs_targetSchema
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="FlowLayout">
<form id="Form1" method="post" runat="server"><asp:DropDownList
id=DropDownList1 runat="server">
<asp:ListItem Value="test2">test2</asp:ListItem>
<asp:ListItem Value="test1">test1</asp:ListItem>
</asp:DropDownList>
</form>
</body>
</HTML>
 
Ad

Advertisements

K

Karl Seguin

Try setting the AutoPostBack="true" in the DropDownList or adding a button.

Karl
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top