In need of using a standard vb calculation, but must remove a character from string from within a formview.
I would imagine this would require some sort of remove or contains code to be used within vb.
I have accessed formview fields using the findcontrol() method:
FormView1.FindControl("FieldName").ToString
& have tried using:
If Me.FormView1.FindControl("DropDownList1").ToString.Contains(":") Then
Dim myFunc As String
myFunc = Me.FormView1.FindControl("DropDownList1").ToString.Replace(":", "")
Me.Label1.Text = myFunc
End If
The idea is to pass the value to the label, where I can then bind the text.
Where it gets tricky, all the fields in formview are being binded using '<%# Binds %>', so how would I include the character removal code from
vb protected sub, to be included with the bind within formview (at the time of submission) and the values passed throught the controller vb?
Since I will need to remove the characters as needed, then do a calculation, and then bind, I'm not sure if the protected sub will calculate, populate text for label, and bind all within the Insert_Button_Sub. I am getting: Object reference not set to an instance of an object.
1. How to remove character from string?
2. How to execute #1 and include within bind to controller?