注册 登录
编程论坛 ASP.NET技术论坛

请教.net用户控件问题

lwygrx 发布于 2010-01-23 15:58, 601 次点击
ascx控件定义了DropDownList,在当前页要读出传回来的值DropDownList tempUserKey = (DropDownList)this.FindControl("DropDownList1");

string role = tempUserKey.Text.;提示System.NullReferenceException: 未将对象引用设置到对象的实例。该如何处理,请各位高手指点,谢谢。
2 回复
#2
yms1232010-01-24 12:36
具体代码怎么写的?
#3
沉墨小菜鸟2010-01-24 12:40
再说详细点
1