473,387 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

What's going on?

I have a radio button list set to autopostback. When I click on one of the
buttons in that list the SelectedIndexChanged event fires but the value of
the selected index is -1 (no selection)? How can that be?

Wayne
Nov 19 '05 #1
2 918
Are you creating these radio button dynamically like from a database. If
that is the case, then you need to initialize the list during the Init
event, otherwise the events are not dispatched. Also, some lists persist
the list of items in the viewstate which allows the server to build the list
at the appropriate time in the life cycle. You could try enabling the
viewstate for that control and then only binding to the data when it is not
a postback.

"Wayne Wengert" <wa***************@wengert.com> wrote in message
news:ek**************@tk2msftngp13.phx.gbl...
I have a radio button list set to autopostback. When I click on one of the
buttons in that list the SelectedIndexChanged event fires but the value of
the selected index is -1 (no selection)? How can that be?

Wayne

Nov 19 '05 #2
Thanks for the response.

These are static (pre-built) lists.

How can the changed event fire if the index has not changed?

Wayne

"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:Ot**************@TK2MSFTNGP14.phx.gbl...
Are you creating these radio button dynamically like from a database. If
that is the case, then you need to initialize the list during the Init
event, otherwise the events are not dispatched. Also, some lists persist
the list of items in the viewstate which allows the server to build the list at the appropriate time in the life cycle. You could try enabling the
viewstate for that control and then only binding to the data when it is not a postback.

"Wayne Wengert" <wa***************@wengert.com> wrote in message
news:ek**************@tk2msftngp13.phx.gbl...
I have a radio button list set to autopostback. When I click on one of the buttons in that list the SelectedIndexChanged event fires but the value of the selected index is -1 (no selection)? How can that be?

Wayne


Nov 19 '05 #3

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

Similar topics

125
by: Sarah Tanembaum | last post by:
Beside its an opensource and supported by community, what's the fundamental differences between PostgreSQL and those high-price commercial database (and some are bloated such as Oracle) from...
13
by: Jason Huang | last post by:
Hi, Would someone explain the following coding more detail for me? What's the ( ) for? CurrentText = (TextBox)e.Item.Cells.Controls; Thanks. Jason
9
by: Jay | last post by:
Everywhere I go (read/browse) I see these parameters.... ByVal sender As Object, ByVal e As System.EventArgs Yet I never see them used within the function/method. Could someone tell me what they...
63
by: Jake Barnes | last post by:
In the course of my research I stumbled upon this article by Alex Russel and Tim Scarfe: http://www.developer-x.com/content/innerhtml/default.html The case is made that innerHTML should never...
7
by: newbie | last post by:
anyone know is it this source code value:- T = ((Y >> 4) ^ X) & 0x0F0F0F0F; X ^= T; Y ^= (T << 4); T = ((Y ) ^ X) & 0x10101010; X ^= T; Y ^= (T ); X = (LHs << 3) | (LHs << 2)...
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
6
by: LurfysMa | last post by:
I am working on an electronic flashcard application. I have one version up and running using Visual Basic (6.0) and Access 2000. My long-range plans are to put it up on a website and sell...
98
by: tjb | last post by:
I often see code like this: /// <summary> /// Removes a node. /// </summary> /// <param name="node">The node to remove.</param> public void RemoveNode(Node node) { <...> }
10
by: JoeC | last post by:
I have been programming for a while and I have seen this syntax before and I copied this from a book but the book didn't explain what is going on here. class engine{ protected: static engine*...
6
by: BJ | last post by:
I just started this week on a new project. The existing project uses BEA Tuxedo as a second layer service broker. The clients make calls to the Tux services which in turn retrieves data from an...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.