Good Day all
i have the following
and the Function CleanBondNumber is defined like thisCode:<%# clsFlow.CleanBondNumber(Eval("ATB_NUMBER"))%>
i stepped through the code and after it returns something i cant bind the Data, i get an ExceptionCode:Public Shared Function CleanBondNumber(ByVal val As Object) As String Dim Final_bond_acc_no As String = String.Empty If (val.ToString().Contains("Offer")) Then 'Get rid of the Offer string Dim Finalstring As String Finalstring = val.ToString.Substring(6) If (Finalstring.Contains(" ")) Then 'Get the Position of the Space Dim SpacePost As Integer SpacePost = Finalstring.IndexOf(" ") Final_bond_acc_no = Finalstring.Substring(0, SpacePost - 1) Return Final_bond_acc_no Else Return val.ToString() End If Else If (val.Contains(" ")) Then 'Get the Position of the Space Dim SpacePost As Integer SpacePost = val.IndexOf(" ") Final_bond_acc_no = val.Substring(0, SpacePost - 1) Return Final_bond_acc_no Else Return val.ToString() End If End If End Function
ThanksCode:<%# clsFlow.CleanBondNumber(Eval("ATB_NUMBER"))%> '=' expected.


Reply With Quote

