why cant you set the datasurce of dropdown as ur datatable and bind the control directly without using the loop?
On Mon, Jan 18, 2010 at 4:42 PM, <[email protected]> wrote: > - > > REG: How to improve the performance of dropdown list loading in asp.net1.1 > > My current project is done using asp.net 1.1 version. Anthem panel > (Anthem.net) is used in the pages. Some of pages has many dropdown lists > which has dependent values in it. > > On changing of value in one dropdown, other dropdown values to be filled > up. In local environment it is loading reasonable time. But in the > production server, it takes more time to load the values in the dependent > dropdown lists. The values loaded in the dropdown lists are master values, > so hopefully it wont have large no. of values. > > I am unable to find out the reason for the poor performance of dropdown > list loading. > > > CODING : > Protected Sub Problem_Category_SelectedIndexChanged() > If dsMaster.Tables(0).Rows.Count > 0 Then > With dsMaster.Tables(0) > For iRow As Integer = 0 To .Rows.Count - 1 > With .Rows(iRow) > li = New ListItem(.Item("SubCat"), > .Item("SubCatCode")) > Problem_SubCategory.Items.Add(li) > End With > Next iRow > End With > End If > > End sub > > What might be reason for slowness of dropdown list binding - can anybody > give me suggestions on this? > > Expecting your reply on this regard. Thanks in advance. > > If you need any other details please revert me. > > Regards, > > geetha > > -- > Sent by http://webuzz.im/mail/ web mail client > -- "People who never make mistakes, never do anything." Crazy
