如何动态增加DataTable的值 [英] How we can increase the DataTable value dynamically

查看:64
本文介绍了如何动态增加DataTable的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经完成了与数据库的连接
但是当我增加单选按钮列表中的值时,它不会增加......

表示
更改问题后,其选项也会更改
但是反面它的值不是该选项的值,它显示第一个问题选项,,,,

所以请给我答案......


这是代码...

I had already done the connection with database
but when I increase the value in the radio button list it doesn''t increase the...........

means
When question is changed it''s option also changed
but in back hand it value is not come of that option it display first question option,,,,,

So plz give me answer...............


here is code......

Label2.Text = Convert.ToString(ds.Tables(0).Rows(Session("point"))(1))
RadioButtonList1.Items(0).Text = (ds.Tables(0).Rows(Session("point"))(2))
RadioButtonList1.Items(1).Text = Convert.ToString(ds.Tables(0).Rows(Session("point"))(3))
RadioButtonList1.Items(2).Text = Convert.ToString(ds.Tables(0).Rows(Session("point"))(4))
RadioButtonList1.Items(3).Text = Convert.ToString(ds.Tables(0).Rows(Session("point"))(5))





If CInt(Label4.Text) > 0 Then
          str = RadioButtonList1.SelectedValue
          con.Open()
          cmd = New OleDbCommand("select * from unixquedb where qno=" & CInt(Label4.Text) & " and ans ='" & str & "' ", con)
          dr1 = cmd.ExecuteReader()
          If dr1.Read = True Then
              ' "select * from unixquedb where ans ='" & str & "'" Then
              marks = +1
          End If
      End If

推荐答案

看似随机的单词集合就不成问题了.如果您不会说英语,请找一个愿意(或至少会更好)为您发布问题的人.
A seemingly random collection of words doesn''t make it a question. If you can''t speak enloish, find someone that does (or at least does it better) to post the quetion for you.


这篇关于如何动态增加DataTable的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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