Rexxx
MIS
- Oct 16, 2001
- 47
- 0
- 0
I have the following array (see below) and it populates a dropdownlist. The way it works now is without an initial selection the dropdownlist displays a blank ("" value. Once the user makes a selection from the dropdownlist and updates accordingly then wishes to go back and clear the selection by selecting a blank in the dropdownlist no blank is provided as an option to select. How can I add a blank to this array?
Dim selectCMD7 As SqlCommand = New SqlCommand()
Dim data7 as SqlDataReader
selectCMD7.CommandText = "Select coname From org where orgtype = 'Fund'"
selectCMD7.Connection = dbconn1
selectCMD7.CommandTimeout = 30
dbconn1.Open()
data7 = selectCMD7.ExecuteReader()
Dim fund1array as ArrayList
fund1array = new ArrayList()
fund1array.add(""
Do while data7.read()
fund1array.add(data7("coname")
loop
dbconn1.close()
fund1array.Insert(0, coDS.tables("company".Rows(0).Item("fund")
fund1.DataSource = fund1array
fund1.DataBind()
Dim selectCMD7 As SqlCommand = New SqlCommand()
Dim data7 as SqlDataReader
selectCMD7.CommandText = "Select coname From org where orgtype = 'Fund'"
selectCMD7.Connection = dbconn1
selectCMD7.CommandTimeout = 30
dbconn1.Open()
data7 = selectCMD7.ExecuteReader()
Dim fund1array as ArrayList
fund1array = new ArrayList()
fund1array.add(""
Do while data7.read()
fund1array.add(data7("coname")
loop
dbconn1.close()
fund1array.Insert(0, coDS.tables("company".Rows(0).Item("fund")
fund1.DataSource = fund1array
fund1.DataBind()