解释数据表 [英] explain th datatable

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

问题描述

表名用户

tablename User

Id           int                   
Email         varchar(500)
Password       varchar(500)
Name            varchar(500)



表中的数据是



DATA IN TABLE IS

Id Email          Password Name 
1  ali@yahoo.com   1234     ali
2  usman@yahoo.com  1234    usman



我问你简单的数据表如何工作



i ask you about simply how datatable working
is

Label1.text=datatable.Rows[0]["Name"].Tostring();

用于行ali@yahoo.com 1234 ali
和Label1.Text = datable.Rows [1] ["Name"].Tostring();用于行usman@yahoo.com 1234 usman


for Row ali@yahoo.com 1234 ali
and Label1.Text=datable.Rows[1]["Name"].Tostring(); is for row usman@yahoo.com 1234 usman


1 ali@yahoo.com 1234 ali          // is this is row 0?

2   usman@yahoo.com  1234  usman      // is  this is row1?

推荐答案

在会话中获取ID.然后在Pageload中进行查询,并获取有关ID的名称,例如"Select * from User where Id=''+Session["ID"].Tostring()+"''".

然后Label1.text= ....... .


希望对您有所帮助.
Take the ID in session. And in Pageload make a query and fetch the name with respect to id like "Select * from User where Id=''+Session["ID"].Tostring()+"''".

And then Label1.text= ....... .


Hope this can help you.


这篇关于解释数据表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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