Originariamente inviato da DeBe99
come non c'è la collezione
senti, o sono io che sto diventando scemo oppure
allora, con un button uso
codice:
Private Sub Button1_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Init
Dim b As Button = DirectCast(sender, Button)
b.Attributes.Add("", "")
End Sub
col radiobutton
codice:
Private Sub RadioButtonA_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadioButtonA.Init
Dim r As radiobutton = DirectCast(sender, radiobutton)
End Sub
va in errore di cast ?????
provo con:
codice:
Private Sub RadioButtonB_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadioButtonB.Init
Dim r As System.Web.UI.WebControls.RadioButton = DirectCast(sender, System.Web.UI.WebControls.RadioButton)
End Sub
il cast va
però se tento di scrivere
r.Attributes..... va in errore
DOPO LA TUA RISPOSTA vado nell'evento load e scrivo:
codice:
Me.RadioButtonA.Attributes.Add("", "")
E VA!!!
Uso VisualStudio 2003