从excel数据库为RadioButtonList分配值 [英] Assign values to RadioButtonList from excel database

查看:90
本文介绍了从excel数据库为RadioButtonList分配值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一张excel表作为数据库,我需要从该数据库中检索数据并将其存储在标签和单选按钮中。例如,我有问题和答案在excel sheet中。现在我想从excel表中随机检索数据,我已成功将数据从excelsheet加载到标签和单选按钮列表。

但我在将值加载到单选按钮时遇到问题list.The问题是值被分配给下一个单选按钮列表.....任何人帮助我,

提前谢谢。

解决方案

< blockquote>看来你有一套q&a像Dictionary< question,>来自excel的格式。

通过说下一个单选按钮你的意思是对于问题A,答案单选按钮正在获得问题b的答案吗?



检查用于识别页面中单选按钮列表的逻辑。逻辑应该是,一旦读取了q&a,就需要迭代列表并为给定项创建一组[标签,单选按钮列表]。看来,从excel读取q&a时,映射会出错。一旦您的数据源填充逻辑得到验证(请提供您用于Excel读取的代码),它只需要在页面上显示随机问题的字典迭代


Hi everyone,
I am having an excel sheet as a database and i need to retrieve data from that database and store it in labels and radio buttons.For example, I am having questions and answers in that excel sheet.Now i want to retrieve data from excel sheet randomly,i have succeeded in loading data from excelsheet to label and radio button list.
But i have the problem in loading values to radio button list.The problem is the values are assigned to next radio button list..... Anyone help me,
Thanks in advance.

解决方案

It seems that you have got a set of q&a like Dictionary<question,> format from the excel.
By saying "next radio button" do you mean that for question A, the answer radio button is getting answers for question b?

Check the logic used to identify the radio button list in the page. The logic should be that once the q&a are read, the list needs to be iterated and a set of [label, radio button list] to be created for the given item. It seems that while reading the q&a from excel, the mapping gets wrong. Once your datasource population logic is verified (please provide the code you are using for excel reading), its just dictionary iteration which is required to show the random question on the page


这篇关于从excel数据库为RadioButtonList分配值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆