Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > Pro VB.NET 2002/2003
|
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 13th, 2003, 12:47 PM
Registered User
 
Join Date: Jul 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default radiobuttonlist in a paging datalist

I am having a hard time getting a datalist to page, and retrieve the value of a selected RadioButtonList item in one web form. The RadioButtonList is bound based on the item in the datalist. Disabling View State has not helped me with this. For some reason, I can retrieve a value from the current list, but it is not always the item that I selected.

For example, I am creating an online exam (a datalist) with the question and answers on 1 item - the page size is set to 1 item, so 1 question is displayed at a time. Based on a hidden label with the question ID, I retrieve the answers via a DataReader and then bind to the RadiobuttonList. I am currently doing a response.write of the selected item to find a pattern, but there seems to be none. Regardless of what is selected, one random item is being set as the selected item.

Anyone have experience with this, or suggestions?

Thanks.
 
Old October 14th, 2003, 02:16 PM
Registered User
 
Join Date: Jul 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I figured out the problem here... I had multiple items with the same value in the datavaluefield property. The value for all incorrect answers was 0, and the value for the correct answer was 1. When a user clicked the correct answer, it worked fine. When a user clicked an incorrect answer, it grabbed the first incorrect answer in the list. I changed the datavaluefield to a unique ID and all is well. I thought that multiple list items could have the same value...

 
Old August 13th, 2004, 09:16 AM
Registered User
 
Join Date: Aug 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Paging DataList :

http://www.egypte-ancienne.com/





Similar Threads
Thread Thread Starter Forum Replies Last Post
paging datalist shanwaj ASP.NET 2.0 Basics 1 March 25th, 2008 12:03 AM
Datalist Paging nedo_786 ASP.NET 2.0 Professional 9 September 20th, 2007 04:32 AM
Datalist-edititemtemplate-RadioButtonList cp75 ASP.NET 1.0 and 1.1 Basics 1 September 1st, 2006 12:56 PM
Datalist Paging in C# caitydev ASP.NET 2.0 Basics 0 March 29th, 2006 06:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.