Your Welcome That's a popular question, I use to bind years ago, but overall in the end, the bindings have to be recreated if you move your project to another server or something. And it was so slow, because the binding code has to be created every time it's used. So you create a function to load the data, and package the data in a class or structure, and loop through the class or structure records. Something like below code, that's just off the top of my head in vb, but you should get the idea.
Public Structure structure_States
Public p_StateName as string
Public p_StateAbbr as string
End Structure
Public Sub load_States()
ddl\_StateNames\_Field.Items.Clear
Dim p\_stateCount as Integer = get\_StateNames\_Count()
Dim sSn(p\_stateCount) as structure\_States
Dim dwExitCode as Integer = load\_StateNames(sSn)
if (0 = dwExitCode) then
For idx as Integer = 0 to sSn.length - 1
ddl\_StateNames.Item.add(new ListItem(sSn(idx).p\_StateName, sSn(idx).p\_stateAbbr))
Next
end if
end Sub
Public Function load_StateNames(ByRef s_StateNames() as structure_States) As Integer
Dim dwExitCode as Integer = 2
'Do Database Read
return dwExitCode
End Function