Hi there i am a biggener to vb.net, i am currently creating a web application for a mobile phone. I need a textbox that I have on one form to change colour depending on the information that is displayed in that text field.
The if statment I am using works fine for changing the forms background but when i use it to change the textbox background nothing happens
my code is as follows
Protected Sub oblstRec_ItemSelect(ByVal sender As Object, ByVal e As System.Web.UI.MobileControls.ObjectListSelectEventArgs) Handles oblstRec.ItemSelect
Me.ActiveForm = frmRes
lblpartn.Text = e.ListItem.Item("PartNumber")
txtpartn.Text = e.ListItem.Item("PartName")
txtcon.Text = e.ListItem.Item("Condition")
txtloc.Text = e.ListItem.Item("Location")
txtquan.Text = e.ListItem.Item("Quantity")
txtval.Text = e.ListItem.Item("Valid")
If (txtval.Text = 0) Then
Me.txtval.BackColor = Drawing.Color.Aqua
Else
Me.txtval.BackColor = Drawing.Color.Azure
End If
End Sub
hope someone can help it driving me nuts
lee
The if statment I am using works fine for changing the forms background but when i use it to change the textbox background nothing happens
my code is as follows
Protected Sub oblstRec_ItemSelect(ByVal sender As Object, ByVal e As System.Web.UI.MobileControls.ObjectListSelectEventArgs) Handles oblstRec.ItemSelect
Me.ActiveForm = frmRes
lblpartn.Text = e.ListItem.Item("PartNumber")
txtpartn.Text = e.ListItem.Item("PartName")
txtcon.Text = e.ListItem.Item("Condition")
txtloc.Text = e.ListItem.Item("Location")
txtquan.Text = e.ListItem.Item("Quantity")
txtval.Text = e.ListItem.Item("Valid")
If (txtval.Text = 0) Then
Me.txtval.BackColor = Drawing.Color.Aqua
Else
Me.txtval.BackColor = Drawing.Color.Azure
End If
End Sub
hope someone can help it driving me nuts
lee