473,657 Members | 2,531 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Radio button Not doing event

I have 2 radio buttons:

<asp:RadioButto n ID="radDetail" GroupName="deta ilSummary"
Text="Detail" checkedChanged= "RadDetail_Clic ked" runat="server" />
<asp:RadioButto n ID="radSummary " GroupName="deta ilSummary"
Text="Summary" checkedChanged= "RadSummary_Cli cked" runat="server" />
</p>

I want to have RadDetail_Click or RadSummary_Clic k executed as soon as the
radio button is clicked.

The buttons work fine and you can see the them change as you select them,
but the events are not executed.

Is there something else you need to set to make them work?

Thanks,

Tom.
Nov 18 '05 #1
2 1758
you have to set autopostback to true. this will generate same javascript
that will postback on the change event.

note: this is really bad ui behavior. the user will not expect clicking on a
radio button to post the page (which takes some time on the internet), and
will start to type in other controls. you will need to give some feedback
that a postback is happening.

-- bruce (sqlwork.com)
"tshad" <ts**********@f tsolutions.com> wrote in message
news:uV******** *****@TK2MSFTNG P11.phx.gbl...
| I have 2 radio buttons:
|
| <asp:RadioButto n ID="radDetail" GroupName="deta ilSummary"
| Text="Detail" checkedChanged= "RadDetail_Clic ked" runat="server" />
| <asp:RadioButto n ID="radSummary " GroupName="deta ilSummary"
| Text="Summary" checkedChanged= "RadSummary_Cli cked" runat="server" />
| </p>
|
| I want to have RadDetail_Click or RadSummary_Clic k executed as soon as the
| radio button is clicked.
|
| The buttons work fine and you can see the them change as you select them,
| but the events are not executed.
|
| Is there something else you need to set to make them work?
|
| Thanks,
|
| Tom.
|
|
Nov 18 '05 #2
"bruce barker" <no***********@ safeco.com> wrote in message
news:Ok******** *****@TK2MSFTNG P14.phx.gbl...
you have to set autopostback to true. this will generate same javascript
that will postback on the change event.

note: this is really bad ui behavior. the user will not expect clicking on
a
radio button to post the page (which takes some time on the internet), and
will start to type in other controls. you will need to give some feedback
that a postback is happening.
This page has 2 grids on it, one for detail and one for summary. Only one
is visible at a time. What I was trying to do was set it up (similar to
sorting where you just press the Column title which re-sorts the table).

I have 2 radio buttons that show what you are looking at (Summary or
Detail). When you press the Summary radio button, the detail datagrid will
have visible turned off and the Summary datagrid will have visible turned
on. It will then run a different select call that will fill the Summary
Datagrid. Same thing happens if you press Detail.

I didn't want the user to have to press the radio button and then another
button. Also, it is plain what you are looking at as the radio buttons show
what you are looking at.

I tried setting the autopostback and it does post back, but doesn't go to
the checkedChanged events at all.

Tom.

-- bruce (sqlwork.com)
"tshad" <ts**********@f tsolutions.com> wrote in message
news:uV******** *****@TK2MSFTNG P11.phx.gbl...
| I have 2 radio buttons:
|
| <asp:RadioButto n ID="radDetail" GroupName="deta ilSummary"
| Text="Detail" checkedChanged= "RadDetail_Clic ked" runat="server" />
| <asp:RadioButto n ID="radSummary " GroupName="deta ilSummary"
| Text="Summary" checkedChanged= "RadSummary_Cli cked" runat="server" />
| </p>
|
| I want to have RadDetail_Click or RadSummary_Clic k executed as soon as
the
| radio button is clicked.
|
| The buttons work fine and you can see the them change as you select
them,
| but the events are not executed.
|
| Is there something else you need to set to make them work?
|
| Thanks,
|
| Tom.
|
|

Nov 18 '05 #3

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

Similar topics

3
3119
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...
14
1918
by: Steve Chatham | last post by:
I have a combo box that gets populated with a group of items based on a sql table. I had in mind that I'd insert a value at the beginning of that combo box, that'd say "No Item Selected" and that when the selected index property was changed, to automatically populate a datagrid below that combo box based on the item selected. As an alternative, if the user wanted to see everything (a customer list), I wanted to put a radio button...
7
4247
by: Geoff Jones | last post by:
Hi I'm hoping that someone can help me with the following question about Radio Buttons. In MFC there is a way of attaching a variable to several radio buttons so that it can be looked at to see which of the radio buttons is checked. However, in VB.NET, I can't see how to do this, other than doing it manually in the code e.g.
1
8829
by: Jerry | last post by:
We have a 10-question quiz for kids, each question being a yes or no answer using radio selections. I'd like to keep a current total of yes's and no's at the bottom of the quiz (if the user selects yes to question 1, the total of yes's increases by 1). I've been searching for a while but I'm not sure I'm searching with the right keywords. Can anyone direct me to a source I can review to learn how to do this? Thanks! --
1
2972
by: Joe Attardi | last post by:
Hi all, On a form on one of my pages I have two <select> elements, and each one is paired up with a radio button. The idea is to choose an item from one list or the other and select the radio button of the list you want to use. I'm using JavaScript to automatically select the radio button corresponding to a list when you click on the list (using the onclick event handler). Is that the best event to change on, or should this
3
5831
by: Harry Haller | last post by:
I have a radio button group. When the page loads none of them are selected. OnClick selects ONE and clicking another one selects a different one - this is normal behavior. I want to modify it so that clicking on a radio which is already selected will deselect it so that none of the group are selected. I can get the required behavior with a double-click: ondblclick="this.checked=!(this.checked);"
4
2512
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...
2
2558
by: Gugale at Lincoln | last post by:
Hi, I am creating a user control which has a radio button and few other controls. I would like the user control to behave like a radio button, in the sense when added to a container radio button on only one of the user controls should be selected at any given point of time. I am going to use this control in different places. What is the best way of designing such a user control? Thanks
4
3085
by: Z.K. | last post by:
I started a forms application and I put on the form three buttons. In the functions for the radio buttons I put in a single messagebox like: MessageBox("Hello 1") MessageBox("Hello 2") MessageBox("Hello 3")
0
8842
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...
1
8516
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
8617
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...
1
6176
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5642
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
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2743
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1970
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1733
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.