标题:为什么找不到控件
只看楼主
casualhewo
Rank: 1
等 级:新手上路
帖 子:267
专家分:0
注 册:2006-6-13
 问题点数:0 回复次数:0 
为什么找不到控件
DropDownList dropdownlistevents = (DropDownList)PreviousPage.FindControl("dropdownlistevents");
string selectedEvent = dropdownlistevents.SelectedValue;
string firstname = ((TextBox)PreviousPage.FindControl("TextBox1")).Text;
string lastname = ((TextBox)PreviousPage.FindControl("TextBox2")).Text;
Label1.Text = firstname + " " + lastname + " selected the event " + selectedEvent;
我在第二个页面上显示第一个页面的内容,为什么在查找控件.FindControl方法上找不到
TextBox1 和 TextBox2控件啊.是不是要引用什么啊。
搜索更多相关主题的帖子: 控件 
2007-03-30 02:14



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-127967-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.166360 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved