radio button postback

G

Guest

I have two radio buttons (RB1 + RB2).

The page starts with RB2 selected. Both are enabled.

Action 1 - I press RB1 a postback event happens... but the event handler for
RB1 (CheckedChanged) isn't called.

Action 2 - I press RB2 a postback even happens... everything works good.

Action 3 - I press RB1 a second time... postback event happens + the event
handler code is called.

Does anyone know how a radio button could cause a postback... but not have
its event handler called?

andrew
 
G

Guest

perhaps the postback isnt checking for this, the IsPostBack() check, and you
are redefining?
 
G

Guest

Action 1 - OnInit, PageLoad + OnUnload are hit.
Action 2 - OnInit, PageLoad, RB2.CheckedChanged + OnUnload are hit.
Action 3 - OnInit, PageLoad, RB1.CheckedChanged + OnUnload are hit.

In PageLoad the code is "If Not Page.IsPostBack Then" and all 3 times it is
a postback... so it skips all the code in that method.
 
Joined
Dec 30, 2009
Messages
1
Reaction score
0
Checks you can do when page not posting back..

Check your page parameters at the start of the page especially AutoEventWireup.

Check your designer.cs / designer.vb page code-behind partial class has the control declared, check your html has OnEvent="myfunction" tag.

Check (if using vb.net) that your Sub has Handles MyControl.Event suffix.

Good luck.

Anyone else suggest other checks or pointers?
 

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
474,113
Messages
2,570,688
Members
47,269
Latest member
VitoYwo03

Latest Threads

Top