
14/02/2008, 05:18
|
 | | | Fecha de Ingreso: julio-2007
Mensajes: 296
Antigüedad: 17 años, 7 meses Puntos: 1 | |
Re: custom validatror para 2 combos Ahora, ok. Es decir tienes un customvalidator que llama a una funcion de javascript pasandole como parametro el nombre del combo. Bien, te dejo un poco de codigo de como hago yo para asociar un evento javascript a un boton desde el codebehind pasandole un parametro:
pagina .aspx
Código:
unction OpenPopUp(url,Nome,sFeatures,w,h)
{
if (sFeatures == "")
{
debugger;
sFeatures ='top=25,';
sFeatures +='left=25,';
sFeatures +='scrollbars=no,';
sFeatures +='resizable=no,';
sFeatures +='menubar=no,';
sFeatures +='toolbar=no,';
}
sFeatures +='height='+ h +',';
sFeatures +='width='+ w;
newwin=window.open (url, Nome,sFeatures);
if (!newwin.opener)
newwin.opener=self;
if(parseInt(navigator.appVersion) >= 4)
newwin.window.focus();
}
pagina .aspx.vb
Código:
Dim strClick As String = "OpenPopUp('Fotos.aspx?Codigo=" & LabelCodigo.Text
& "','Fotos','',420,470)"
Me.ImageButtonFotos.OnClientClick = strClick & ";return(false)"
PD: Las lineas del codebehind las tengo en el page_load
Saludos |