viernes, 27 de junio de 2008

Como agregar eventos javascript a un control FileUpload (.net)

Muchas veces necesitamos agregar un evento a un control html como el FileUpload
Por ejemplo si quiero habilitar o hacer visible un boton al momento de elegir un archivo.

En el siguiente ejemplo muestro un boton dentro de un webform al momento de elegir un archivo en el control fileUpload

C#
if !(page.isPostback)
{
fileUpload1.attributes.add("onChange",Boton1.ClienID + ".style.visibility='visible';")
}

No hay comentarios: