I would like to use compare validator to compare the values for two dropdown controls. the field that I would like to use is not DataValueField or DataTextField
sorry, I was not clear with my question.
I am not sure if I could use compDate field from the database selection to compare the value to the other dropdown control.
Sub StartlettingDate()
Dim connectionString As String = ConnectionStrings("ConnectionString").ConnectionString
Dim oOracleConn As OracleConnection = New OracleConnection(connectionString)
Dim strStringBuilder As StringBuilder
strStringBuilder = New StringBuilder
With strStringBuilder
.Append(" select distinct trim(to_char(b.datelet ,'fmMonth ddth yyyy')) DateForLetting , to_char(b.datelet, 'MM/DD/YYYY') compDate, b.datelet datelet ")
.Append(" from bidlet b , letprop l ")
.Append(" where datelet > to_date('12/31/2004','MM/DD/YYYY') ")
.Append(" and datelet < trunc(sysdate) ")
.Append(" and l.letting = b.letting ")
.Append(" AND SUBSTR (l.lcontid, 4, 4) <= '5' ")
.Append(" order by 3 DESC ")
End With
Dim cmdLetting As OracleCommand = New OracleCommand()
cmdLetting.Connection = oOracleConn
cmdLetting.CommandType = CommandType.Text
cmdLetting.CommandText = strStringBuilder.ToString
Dim adLetting As New OracleDataAdapter(cmdLetting)
Dim dsLetting As New DataSet
adLetting.Fill(dsLetting, "LettingDate")
ddLetting.DataValueField = "datelet"
ddLetting.DataTextField = "DateForLetting"
ddLetting.DataSource = dsLetting
ddLetting.DataBind()
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.