Hi all,
I have 2 subroutine in my dataAccess class that basically populates dropdownbox and listbox.
I'm trying to cut this down to one instead of two, is it possible please?
Present code(s)
And the other
What i'd like is to have just the one like so..
Public Sub FillDBControl(c as control, sql as string .....)
Any possibilities..
ASP.Net 2.0
Thank you
Allen
I have 2 subroutine in my dataAccess class that basically populates dropdownbox and listbox.
I'm trying to cut this down to one instead of two, is it possible please?
Present code(s)
VB.NET:
Public Overloads Sub FillDBControl(ByVal lb As ListBox, ByVal sql As String, ByVal value As String, ByVal text As String)
lb.DataSource = ReturnDR(sql)
lb.DataTextField = text
lb.DataValueField = value
lb.DataBind()
End Sub
VB.NET:
Public Overloads Sub FillDBControl(ByVal ddl As DropDownList, ByVal sql As String, ByVal value As String, ByVal text As String)
ddl.DataSource = ReturnDR(sql)
ddl.DataTextField = text
ddl.DataValueField = value
ddl.DataBind()
End Sub
Public Sub FillDBControl(c as control, sql as string .....)
Any possibilities..
ASP.Net 2.0
Thank you
Allen
Last edited by a moderator: