[thelist] .NET: AutoPostBack on Items Added programmatically

Peter Brunone (EasyListBox.com) peter at easylistbox.com
Wed Apr 11 12:01:08 CDT 2007

Hi Casey,

    Since you're adding an event handler, you need to use the following syntax:

AddHandler drpBuilderBigNo.SelectedIndexChanged, AddressOf drpBuilderBigNo_SelectedIndexChanged

...and then you would define the sub itself this way:

Protected Sub drpBuilderBigNo_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) 
    ' do stuff 
End Sub



From: "Casey Crookston" caseyc at IntelliSoftmn.com 


I am adding rows to a table programmatically. In one of the table
cells, I am adding a drop down list as such:

Dim drpBuilderBigNo As New DropDownList

[cut a bunch of lines of code]

drpBuilderBigNo.AutoPostBack = True



More information about the thelist mailing list