how do i put the onblur and onfocus attributes on a textbox created programatically? here's my code -
td = New HtmlTableCell td.Style.Add("padding-bottom", "5px") Dim txtbox As New TextBox txtbox.Style.Add("width", "96%") txtbox.ID = "ename" td.Controls.Add(txtbox) tr.Cells.Add(td) td.Style.Add("padding-top", "5px")
now i want to add onblur and onfocus. is there something like? --
txtbox.attributes.Add("onblur","Enter Name")
txtbox.attributes.Add("onfocus","")
i tried this, and doesn work. does anyone know how to do this?