您的位置:程序门 -> .net技术 -> c#



c# 传递控件实例做参数问题


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


c# 传递控件实例做参数问题[已结贴,结贴人:casalina]
发表于:2007-03-13 09:51:58 楼主
小妹刚接触c#,由于好多网页中都需要绑定dropdownlist控件,所以想写个传递dropdownlist控件做参数的公共函数,这样一调用就ok了,请各位高手不吝赐教。
发表于:2007-03-13 09:56:411楼 得分:0
莫问题!


发表于:2007-03-13 10:07:552楼 得分:0
晕了,请各位老大给个例子阿,着急的说~~
发表于:2007-03-13 10:44:173楼 得分:30
public   static   void   bingdropdownlist(dropdownlist   dplist,   string   codefield,   string   valuefield,   datatable   dt)
        {
                dplist.datasource   =   dt;
                dplist.datavaluefield   =   codefield;
                dplist.datatextfield   =   valuefield;
                dplist.databind();
        }
发表于:2007-03-13 10:47:454楼 得分:0
谢谢,结帖


快速检索

最新资讯
热门点击