如何在3tier Architect中的dropdownlist中绑定ID. [英] how to bind id in dropdownlist in 3tier architect.
本文介绍了如何在3tier Architect中的dropdownlist中绑定ID.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请一些人告诉我如何在3层体系结构中从数据库绑定dropdownlist中的id.在单层体系结构中,可以通过datareader填充dropdownlist,但是在3层体系结构中,我无法在3层体系结构的dropdownlist中填充id.请有人告诉.....
Pls some one tell that how to bind id in dropdownlist from database in 3 tier architecture. In single tier architecture am able to fill dropdownlist by datareader, but in 3 tier architecture i am not able to fill id in dropdownlist in 3 tier architecture. Pls some one tell.....
推荐答案
DropDownList1.DataSource =< datasetobj> .Tables [index];
DropDownList1.DataTextField ="id";
DropDownList1.DataBind();
DropDownList1.DataSource=<datasetobj>.Tables[index];
DropDownList1.DataTextField="id";
DropDownList1.DataBind();
这篇关于如何在3tier Architect中的dropdownlist中绑定ID.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文