Problems with DropDownList and JavaScript

G

Gorka

Ok,

I'm working in VS2005. And I'm using Atlas.

The dropdownlist is binded directly to a ObjectDataSource, this is binded to
a Entity than takes data from de DataBase.

And the General Function that I use to write the javascrit functions in all
the controls is:

Private Function SetOnOFControl(ByRef objLinea As Object, ByVal
nombreControl As String, _

Optional ByVal estilo As String = "etiquetaValue", Optional ByVal estiloSel
As String = "etiquetaValueSel") As Boolean

Try

CType(objLinea.FindControl(nombreControl), Object).CssClass = estilo

CType(objLinea.FindControl(nombreControl),
Object).Attributes.Add("onfocus", "this.className='" & estiloSel & "'")

CType(objLinea.FindControl(nombreControl),
Object).Attributes.Add("onblur", "this.className='" & estilo & "'")

Return True

Catch ex As Exception

Return False

End Try

End Function

Private Function SetOnOfControlesGV(ByRef gvRow As GridViewRow) As Boolean

flagresp = SetOnOFControl(gvRow, "ddlGrupo")

Return True

End Function

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top