Ver Mensaje Individual
  #2 (permalink)  
Antiguo 21/05/2004, 11:37
Avatar de RootK
RootK
Moderador
 
Fecha de Ingreso: febrero-2002
Ubicación: México D.F
Mensajes: 8.004
Antigüedad: 23 años
Puntos: 50
Hi see07, Don´t you speak spanish ? anyway... it doesn´t matter

Well..when you´re trying to set focus into a WC first of all y recommend you that check it source code (page processed) to see then name that recive the page (html) and then, copy and paste its "ID" and put it on you page.aspx

Sample..

wcSample .ascx
...
...
<asp:TextBox id="TextBox1 " runat="server"></asp:TextBox>

page .aspx

Cita:
..
...
<uc1:WebUserControl2 id="WebUserControl21 " runat="server"></uc1:WebUserControl2>
...
...
And when the page is sent to client (check source code) , and will be something like that..:

Cita:
...
...
<input name="WebUserControl21:TextBox1" type="text" id="WebUserControl21_TextBox1 " />
...
..
And then.. put it on you page the following:

Cita:
<body onload="document.getElementById('WebUserControl21_TextBox1' ).focus();">
I hope to be clear..

P.D.- Seguro que no hablas en español...?? (se me hace conocida tu bandera...)


See ya ...
__________________
Nadie roba nada ya que en la vida todo se paga . . .

Exentrit - Soluciones SharePoint & Net