Ver Mensaje Individual
  #2 (permalink)  
Antiguo 14/04/2005, 21:11
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
Y no es mas fácil que le asignes un command name a tu boton desde el modo design de tu datgrid..


Me imagino que por ésto:

... Item.FindControl("IBInmueble")

quere decir que tienes un imagebutton dentro del grid o no..??

Si es así podrías hacer ésto:

Cita:
<asp:DataGrid id="DataGrid1" runat="server">
...
<Columns>
<asp:TemplateColumn>
<ItemTemplate>
<asp:Button ID="IBInmueble" Runat=server CommandName="myButton"></asp:Button>
</ItemTemplate>
</asp:TemplateColumn>
....
....
</Columns>

</asp:DataGrid>
Y en tu codebehind el el itemcommand saber quien es el command que lo manda a llamar...

ejemplo:

Cita:
Private Sub DataGrid1_ItemCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridCommandEventArgs ) Handles DataGrid1.ItemCommand
If e.CommandName = "myButton" Then
'mi codigo

End If
End Sub
Salu2 y espero haber sido claro
__________________
Nadie roba nada ya que en la vida todo se paga . . .

Exentrit - Soluciones SharePoint & Net