textbox background colour issues

lee2006

New member
Joined
Dec 21, 2006
Messages
2
Programming Experience
Beginner
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
 
TextBox Background Color problems

Hi there

I have a web form that displays records from an sql database
When a record is then selected a new form loads displaying the information in textboxs.

I want the last text box to have a coloured background, but i could not get this to work in my vb code. I was using

Textbox1.BackColor = Color.Aqua

This does not do anything, I have been told that for some reason that the color option for mobile controls is ignored when rendering adapter sets but I have nbo idea what this means, does anyone know of a way roand this i realy need to change the color of my mobile textbox

hope somone can help
lee
 
Back
Top