RadioButton does not fire event in ASP.NET

B

Brano

HI all,

I have two radioButtons on my form. They both have autopostback = true
and they are both in the same group. They both have event handlers for
CheckedChanged event. My problem is ont of them fires ok the other one
doesn't at all here is the code for them:

I have tried to delete them drag them from the toolbox again and
restart VS.NET none helped.

VB.NET code:

Private Sub optSettle_CheckedChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles optSettle.CheckedChanged
'# lock and clear other amount
txtOtherAmount.Text = ""
txtOtherAmount.Enabled = False


End Sub

Private Sub optOther2_CheckedChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles optOther2.CheckedChanged
'# unlock other amount
txtOtherAmount.Enabled = True
'# set focus to txtOtherAmount

End Sub


ASP.NET code:

<asp:RadioButton class="GeneralSmall" id="optSettle" runat="server"
Text="Full amount" GroupName="ba"
AutoPostBack="True"></asp:RadioButton>


<asp:RadioButton class="GeneralSmall" id="optOther2" runat="server"
Text="Other amount" GroupName="ba"></asp:RadioButton>





THANKS for any help
 
B

Brano

Thanks that was it I was looking for it so long that i couldnt see
it... THANKS again
 
Joined
Feb 14, 2010
Messages
2
Reaction score
0
Radio Button

Hi,

I am also trying the below code but still i am not getting success as i havent raised event handler effeciently.

can you please tell me how to raise it and use for radio button??

as i have same below logic for my code.......

Public Event CheckedChanged As EventHandler
Dim rb As RadioButton
Dim hand As EventHandler
AddHandler rb.CheckedChanged, hand

Protected Sub RadioButton1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged


TextBox5.Enabled = False

End Sub

still no success !!!!!!!!!!!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top