473,473 Members | 4,297 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Radiobuttonlist selectedindexchanged not firing!

2 New Member
I am stuck with the Radiobuttonlist not working despite the autopostback="true" . It is strange because it was working well previously. I did not make any change to the code. Here is the code that I am using.

If staple value="5" is checked, it should make the div staplelocation visible.Code behind is also available below.

Expand|Select|Wrap|Line Numbers
  1. <table border="true" bordercolor="black">
  2.             <td>
  3.             <asp:RadioButtonList ID="RadioBinding"  runat="server" AutoPostBack="true" RepeatColumns="5" OnSelectedIndexChanged="RadioBinding_SelectedIndexChanged" >
  4.                 <asp:ListItem Text="None" Selected="True" Value="1"></asp:ListItem>
  5.                 <asp:ListItem Text="3 Hole" Value="2"></asp:ListItem>
  6.                 <asp:ListItem Text="Coil(Cost based on # sheets)" Value="3"></asp:ListItem>
  7.                 <asp:ListItem Text="Comb(Cost based on # sheets)" Value="4"></asp:ListItem>
  8.                 <asp:ListItem Text="Staple" Value="5"></asp:ListItem>
  9.             </asp:RadioButtonList>
  10.             </td>
  11.             </table>
  12.  
  13.             <div id="stapleLocation" runat="server" visible="false">
  14.  
  15.             <br /><br />
  16.             <strong><u>Staple Location:</u></strong>
  17.             <table border="true" bordercolor="black">
  18.             <td>
  19.             <asp:RadioButtonList ID="RadioStapleLoc" runat="server" AutoPostBack="true" RepeatColumns="5" >
  20.                 <asp:ListItem Selected="True" Text="Top Left Corner" Value="11"></asp:ListItem>
  21.                 <asp:ListItem Text="Staple 1" Value="21"></asp:ListItem>
  22.                 <asp:ListItem Text="Staple 2" Value="31"></asp:ListItem>
  23.                 <asp:ListItem Text="Staple 3" Value="41"></asp:ListItem>
  24.                 <asp:ListItem Text="Staple 4" Value="51"></asp:ListItem>
  25.             </asp:RadioButtonList>
  26.             </td>
  27.             </table>
  28.             </div>
  29.  
  30.  
  31. protected void RadioBinding_SelectedIndexChanged(object sender, EventArgs e)
  32.         {
  33.             //*****************Binding:staple clicked, display staple location*******************//
  34.             if (this.RadioBinding.SelectedValue == "5")
  35.             {
  36.                 this.stapleLocation.Visible = true;
  37.             }
  38.             else
  39.             {
  40.                 this.stapleLocation.Visible = false;
  41.             }
  42.         }
  43.  
  44.  
  45.  
  46.  
Aug 27 '13 #1
0 1346

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Doug | last post by:
Hi, I wondering if anyone has noticed this and has a workaround. I've set up a delegate for the SelectedIndexChange event and noticed that it is firing twice - does nayone else have...
0
by: PeacError | last post by:
Using Microsoft Visual Studio .NET 2003, Visual C# .NET 1.1: I apologize if this question has been addressed elsewhere, but I could not find a reference to it in the search engine for this...
1
by: Edward | last post by:
I am having a terrible time getting anything useful out of a listbox on my web form. I am populating it with the results from Postcode lookup software, and it is showing the results fine. What...
1
by: Mervin Williams | last post by:
I have a radiobuttonlist object that is bound to a dataview. Although I select different options, the SelectedIndexChanged() method does not fire. Does anyone have any ideas as to why this is...
0
by: Luis Esteban Valencia | last post by:
http://www.codeproject.com/aspnet/DataGridCCEvents.asp#xx1009236xx Read this first and see if you can help me have tried but the Intelisense of the radiobuttonlist doestn have the event...
1
by: CurlyFro | last post by:
i have a userControl (.ascx) that has a dropdownlist embedded in a datagrid. the dropdownlist autopostback is set to true. why isn't the selectedIndexChanged firing? Private Sub...
2
by: Lav KG | last post by:
Hi, I'm populating a RadioButtonList on the fly.It is successfully getting populated but when I click any of items it is not firing SelectedIndexchanged event, SelectedIndex is always -1 and...
2
by: jnoody | last post by:
The problem I am having is with the SelectedIndexChanged event not always firing or the SelectedIndex property not being correct when the event does fire. The code is below, but here are some...
2
by: Vahagn | last post by:
Hi, how do I retrieve the chosen value from a RadioButtonList? I have a RadioButtonList that is populated dynamically with a "Next" button. Ie, I have a list of questions each with 2-3 answer...
6
by: SAL | last post by:
hello, I'm using a radiobuttonlist in an updatepanel in an item template in a Gridview control. I'm populating the radiobuttonlist in the RowDataBound event. I have the control toolkit registered...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...
1
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.