I am trying to write a web app that has a page that contains a table which lists people with the following columns

column1 - Text
column2 - Text
column3 - Textbox
column4 - Text
column5 - dropdownlist
column6 - Text

Each row has Text, Text, Textbox, Text, Dropdown, Text

There will be n number of people in the list.

This table is created dynamically in VB.net code.

How it should work
When a user types a particular character (maxlength = 1) in the textbox the dropdownlist needs to be visible otherwise not visible.
It would be inefficient to postback every time someone types in the textbox as there will be n number of people in the list.
Unless someone can tell me there is a way around that.

The other way I have thought to do it is to use htmlcontrols (Input for the text and select for the dropdownlist) with a runat=server attribute.
To make the select control visible or not the page contains javascript.
Code:
function gohere(){
	if (document.getElementById('Text1').value == 'L')
	{document.getElementById('Select1').style.display = 'none'}									
	else
	{document.getElementById('Select1').style.display = ''}
}
I prefer to use display instead of visible, thats just me.

The code for creating the input box is
VB Code:
  1. tbcCell = New TableCell
  2. Dim txtMarkBox As New System.Web.UI.HtmlControls.HtmlInputText
  3. txtMarkBox.ID = "Mark" & i.ToString
  4. txtMarkBox.EnableViewState = True
  5. txtMarkBox.MaxLength = 1
  6. tbcCell.Controls.Add(txtMarkBox)
  7. tbrRow.Cells.Add(tbcCell)

How do I tell the input what javascript to call?
How do I associate a style class to the input (held in a CSS file)?

I have to declare the input this way because I have validation controls associated with the input.
I did have a VB.NET function which returns a string of the input control which has the style and onblur call but as it is not a control so I cannot associate a validation control with it.
VB Code:
  1. Public Shared Function HTMLMarkText(ByVal strID As String) As String
  2.  
  3.         Dim strText As String
  4.  
  5.         strText = "<INPUT type=""text"" maxlength=""1"" runat=""server"" " & _
  6.         " class=""markbox"" onblur=""gohere();"" ID=""" & strID & """" & _
  7.         " name=""" & strID & """"
  8.         Return strText
  9.     End Function
Any help would be appreciated
I realise its a bit of a longwinded explanation.