473,796 Members | 2,476 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

radio button postback

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
Nov 19 '05 #1
2 1435
perhaps the postback isnt checking for this, the IsPostBack() check, and you
are redefining?

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com

"MER78" wrote:
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

Nov 19 '05 #2
Action 1 - OnInit, PageLoad + OnUnload are hit.
Action 2 - OnInit, PageLoad, RB2.CheckedChan ged + OnUnload are hit.
Action 3 - OnInit, PageLoad, RB1.CheckedChan ged + 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.

"Curt_C [MVP]" wrote:
perhaps the postback isnt checking for this, the IsPostBack() check, and you
are redefining?

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3137
by: John Davis | last post by:
I created a ASP.NET Web Form using VB.NET with a text box, 2 radio buttons. When the user click the first radio button, the text will change to uppercase. If the user clicks the other radio button, the text will change to lowercase. I added the following event, but still won't able to change the text to uppercase. Private Sub RadioButton1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles...
2
1771
by: tshad | last post by:
I have 2 radio buttons: <asp:RadioButton ID="radDetail" GroupName="detailSummary" Text="Detail" checkedChanged="RadDetail_Clicked" runat="server" /> <asp:RadioButton ID="radSummary" GroupName="detailSummary" Text="Summary" checkedChanged="RadSummary_Clicked" runat="server" /> </p> I want to have RadDetail_Click or RadSummary_Click executed as soon as the radio button is clicked.
3
2074
by: Amelyan | last post by:
When we want radio button to belong to a group name we say, radio1.GroupName="GroupA". In this case, radio1 will be unselected if another radio button is selected in "GroupA". Is there a way (trick, custom RadioButton, or javascript) to make radio button (radio1) belong to 2 independent radio button groups instead of one? This would be an equivalent of sayting something like radio1.GroupName1 = "GroupA"; radio1.GroupName2 = "GroupB";
4
2520
by: Blasting Cap | last post by:
I have a page that has a number of radio buttons that will be displayed to different access levels of a user who logs in to my website. For instance, if there are a dozen buttons, user1 will see all twelve. User2 would see buttons 1-3,10-12 and NOT any others, and so on. Since there are several buttons on the page (each one would run a report for them), is there a way to - in an onclick event for each of the buttons - to...
0
9683
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10457
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10231
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10176
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10013
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6792
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5576
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3733
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2927
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.