dim voteds as dataset =new dataset()
voteds.ReadXml(Server.MapPath("db\vote.xml"))
voteds.tables(0).rows(0).item(0)+=1 select case radio1.selecteditem.value
case "1"
voteds.tables(0).rows(0).item(1)+=1
case "2"
voteds.tables(0).rows(0).item(2)+=1
case "3"
voteds.tables(0).rows(0).item(3)+=1
case "4"
voteds.tables(0).rows(0).item(4)+=1
end select
voteds.writexml((Server.MapPath("db\vote.xml")))
用C#做如何完成呢?
voteds.ReadXml(Server.MapPath("db\vote.xml"))
voteds.tables(0).rows(0).item(0)+=1 select case radio1.selecteditem.value
case "1"
voteds.tables(0).rows(0).item(1)+=1
case "2"
voteds.tables(0).rows(0).item(2)+=1
case "3"
voteds.tables(0).rows(0).item(3)+=1
case "4"
voteds.tables(0).rows(0).item(4)+=1
end select
voteds.writexml((Server.MapPath("db\vote.xml")))
用C#做如何完成呢?
解决方案 »
- 求高手帮写个留言本,送上我的所有分,我提供需求文档
- 如何在程序里设置 formsauthentication 验证的cookie 的过期时间呀!
- 用system.net.mail来发送邮件,出现异常!急
- 急急急!我需要编码与解码函数,加解密也行
- 打印
- 新手关于global.asax.cs的疑问
- 关于gridviw中的Rows和DataKeys
- 谁帮忙看看http://aspx.wucai.com/xmlarticle,程序原来是在我机器上编写调试的,可是放到服务器上,注册的时候,原来的一些判断的程序都
- 在ASP.NET(VB)中调用VB6.0控件出现错误提示?
- 如何禁止复制页面上的内容?
- 自定义的分页代码,怎样保证GridView翻页仍然保持排序?
- 怎样清空Session?
voteds.ReadXml(Server.MapPath("db\vote.xml"));
voteds.Tables[0].Rows[0][0]+=1; switch(radio1.selecteditem.value)
{
case "1":
voteds.Tables[0].Rows[0][1]+=1 ;break;
case "2":
voteds.Tables[0].Rows[0][2]+=1; break;
case "3":
voteds.Tables[0].Rows[0][3]+=1;break;
case "4":
voteds.Tables[0].Rows[0][4]+=1;break;
}
voteds.WriteXml((Server.MapPath("db\vote.xml")))
voted.ReadXml((Server.MapPath("db\vote.xml"));
DataTable dt=voted.Tables[0];
dt.Rows[0][Convert.ToInt32(radio1.SelectedItem.Value)]=Convert.ToInt32(dt.Rows[0][Convert.ToInt32(radio1.SelectedItem.Value)])+1;
voteds.WriteXml((Server.MapPath("db\vote.xml")));