S
Slim
I have loop that builds table rows, it also attaches events, this works fine
on all but the last row, where the event fires twice
I have autowireup set to false
any ideas?
For i = 0 To UBound(oCountries.getCountries)
Dim tr As TableRow = New TableRow
Dim td As TableCell = New TableCell
btCountry = New Button
AddHandler btCountry.Click, AddressOf CountryButtClick
btCountry.OnClientClick = "waitForIt()"
btCountry.Attributes.Add("class", "dButtons")
btCountry.CommandArgument = oCountries.getCountries(i).id
btCountry.BackColor = Drawing.Color.Transparent
btCountry.BorderStyle = BorderStyle.None
btCountry.Text = oCountries.getCountries(i).Name
td.Controls.Add(btCountry)
tr.Cells.Add(td)
countryTable.Rows.Add(tr)
Next
on all but the last row, where the event fires twice
I have autowireup set to false
any ideas?
For i = 0 To UBound(oCountries.getCountries)
Dim tr As TableRow = New TableRow
Dim td As TableCell = New TableCell
btCountry = New Button
AddHandler btCountry.Click, AddressOf CountryButtClick
btCountry.OnClientClick = "waitForIt()"
btCountry.Attributes.Add("class", "dButtons")
btCountry.CommandArgument = oCountries.getCountries(i).id
btCountry.BackColor = Drawing.Color.Transparent
btCountry.BorderStyle = BorderStyle.None
btCountry.Text = oCountries.getCountries(i).Name
td.Controls.Add(btCountry)
tr.Cells.Add(td)
countryTable.Rows.Add(tr)
Next