|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Using a radiolistbox control within a datalist controlI have been doing well with learning ASP and VB, but I am stumped on the
following problem. I am hoping someone can give me some pointers..let me know what I should be researching. I have a datalist control that pulls test questions from a sql database into the item template. I then have a radiobuttonlist control that pulls the corresponding answer selections. I can't figure out how to get the selected item from the radio box. I see my datalist as an object, but cannot seem to find a way to get to the radiobuttonlist and it's properties. Thanks for your input! -Dan On 23 May, 14:57, "woodwardonline" <u52106@uwe> wrote: Hi> I have been doing well with learning ASP and VB, but I am stumped on the > following problem. I am hoping someone can give me some pointers..let me know > what I should be researching. > > I have a datalist control that pulls test questions from a sql database into > the item template. I then have a radiobuttonlist control that pulls the > corresponding answer selections. > > I can't figure out how to get the selected item from the radio box. I see my > datalist as an object, but cannot seem to find a way to get to the > radiobuttonlist and it's properties. Thanks for your input! -Dan The problem with using a DataList control to contain a RadioButtonList in each row is that they each need their own datasource and can't derive their values from the one supplying the DataList itself. Presumably the number of questions that are to appear on a page at one time isn't very large. It might be much simpler to declare a fixed set of controls in a table and populate them programmatically with an iteration routine that shouldn't be too hard to write. That way you will have the benefit of straightforward event handling and reading the selected values when the user submits the answers. HTH
Simple composite control fires event fires first time but not second
Adding "other" data in a formview on insert and update Web format templates Persisting complex data between calls full screen web page Grid view Re: ImageUrlEditor - why can't i find it? Re: ImageUrlEditor - why can't i find it? RE: ClientIds for individual CheckBoxes in a CheckBoxList RE: ajax tab container control |
|||||||||||||||||||||||