惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 叶小钗
云风的 BLOG
云风的 BLOG
G
Google Developers Blog
S
SegmentFault 最新的问题
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
美团技术团队
爱范儿
爱范儿
博客园 - 三生石上(FineUI控件)
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
DataBreaches.Net
F
Fortinet All Blogs
TaoSecurity Blog
TaoSecurity Blog
D
Docker
C
Cybersecurity and Infrastructure Security Agency CISA
K
Kaspersky official blog
宝玉的分享
宝玉的分享
腾讯CDC
Google Online Security Blog
Google Online Security Blog
Recorded Future
Recorded Future
T
The Exploit Database - CXSecurity.com
T
The Blog of Author Tim Ferriss
V
V2EX
S
Securelist
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
C
CERT Recently Published Vulnerability Notes
A
Arctic Wolf
Scott Helme
Scott Helme
L
LINUX DO - 热门话题
Y
Y Combinator Blog
P
Proofpoint News Feed
T
Tor Project blog
AWS News Blog
AWS News Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Last Watchdog
The Last Watchdog
博客园 - 聂微东
T
Threat Research - Cisco Blogs
B
Blog
Attack and Defense Labs
Attack and Defense Labs
L
Lohrmann on Cybersecurity
C
CXSECURITY Database RSS Feed - CXSecurity.com
阮一峰的网络日志
阮一峰的网络日志
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
IT之家
IT之家
N
News and Events Feed by Topic
博客园 - 司徒正美
H
Help Net Security
C
Cisco Blogs
C
Check Point Blog
S
Secure Thoughts

博客园 - David

微创急聘实习生1名 有感于最近一个朋友买股票大亏 从数据表中取出第n条到第m条的记录的方法 dts无法识别Excel中的数字列?(续) dts无法识别excel中的数字值? 如何在定义游标的时候使用动态sql语句? Sql2005 Beta3 Reporint Service问题1 -Row的Grouping属性无法取消 微创急聘实习生1名 批量insert数据 获得SqlServer数据库连接信息 sql server多表关联update 用css filter做颜色渐变的问题 从sql2000导入数据到sql2005的问题 果然是.net写的 为啥Sql 2005 Management Studio 这么慢?? How to run DTS at sqlserver2005 用WebDav调用Exchange发信(2)-使用他人名义 傻×的Yukon Beta3安装程序 Teched初体验(第一天)
Asp.ne页面提交时,动态生成的UserControl消失了。
David · 2005-11-04 · via 博客园 - David

项目中有个考试页面,此页面中会显示一些考题,考题都是选择题, 选项用RadioButton的方式呈现。用户选择答案后点击“提交”按钮提交考试。
为了方便其间,我把每个考题做成了Usercontrol,用下面的代码动态加载,

private void BindItems
{
//先从数据库中随机取得一定数量的考题
for(int i = 0; i < it.Rows.Count; i ++)
{
Control u 
= LoadControl("UserControl/UCTestItem.ascx");
u.EnableViewState 
= true;
UCTestItem uc 
= (UCTestItem)u;
uc.EventID 
= Request.QueryString["TestEventID"];
uc.Bind(it.Rows[i]);
Panel1.Controls.Add(u);
}

}

在Page_Load时间中调用上面的方法:

if(!this.IsPostBack)
BindItems(
);

现在的问题是,当用户点击“提交”按钮后,所有动态加载的UCTestItem控件,都消失了。
由于BindItems是随机取题,所以不能每次刷新页面都调用。
该如何解决?谢谢!