Q for the computer geeks

Messages
159
Likes
0
Location
Central, CA
#1
Anyone have expertise / experience with ASP .net? I'm stummped on a problem for a project that is suppsed to be done today. Here's a short overview:

Two radio buttons, determine the contents of a databound list box. Several labels and the contents of a repeater are determined by the selection of the list box. Radio buttons postback automatically, and the list contents works just fine. But for the labels and the repeater to update properly, the listbox must postback automatically. But the postback event reloads the form, which rebinds the listbox, which changes the selecteditemindex to 0, with triggers the selecteditemchanged event, which updates the labels and repeater with data for the first item in the list.[?|]
 
Messages
159
Likes
0
Location
Central, CA
#2
OK, so I'm a dumbass. Found the problem... I was calling the databind even for the list box on form load. Works much better if databind is done only when radio button checked changed (which means the bound data changed). Listbox selected item is reset only when databind is called, not on postback.
 


Top