Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/08/2007, 15:47
brujota
 
Fecha de Ingreso: agosto-2007
Mensajes: 5
Antigüedad: 16 años, 8 meses
Puntos: 0
Seleccionar Radio Button

Hola, tengo un problema al intentar seleccionar un radio button. Trabajo en asp .net. Este es mi codigo.
Creo una tabla dinamica donde se insertan unos radio button, al pulsar el boton. ¿Como puedo saber que radio se ha pulsado?


Partial Class _Default
Inherits System.Web.UI.Page


Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
' ¿Que radio se ha pulsado?
End Sub

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim tabla As Table
Dim fila As TableRow
Dim columna As TableCell
Dim i As Integer
Dim radio As RadioButton

If Not Page.IsPostBack Then
tabla = New Table()

fila = New TableRow()
For i = 0 To 3
columna = New TableCell()
radio = New RadioButton()
radio.GroupName = "radioButton"
radio.ID = i
columna.Controls.Add(radio)
fila.Controls.Add(columna)
Next i

tabla.Controls.Add(fila)
Label1.Controls.Add(tabla)
End If
End Sub
End Class