datalist ItemDataBound绑定数据后没有值,急急,,谢谢帮忙!
private string TestPaperID= "tiku3 ";//试卷号
//private string TestPaperName;//试卷号
private int RecorderCount=0;//总记录数
private int pageID=1;//当前页号
private int PageSize=10;//每页记录数
private int pageCount=20;//返回总记录数
private int TotalPageCount=3;//返回总页数
Title title = new Title();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Bind();
//string option;
//option=
}
}
private void Bind()
{
//int id = 4;
title.BindTitleList(DataList1, TestPaperID,RecorderCount, pageID, PageSize, pageCount, TotalPageCount);
// 去数据库取该页对应的数据
//循环该数据集,对每行(每道题),取提号,提干,OPTION
//提号,提干“直接”显示在页面上,OPTION用SPLIT截取
//循环OPTION数组,将每个OPTION加载到RADIO
}
protected void DataList1_ItemDataBound(object sender, DataListItemEventArgs e)
{
//if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
//{
//RadioButtonList rbl = e.Item.FindControl( "rblTitle ");
Literal ll = (Literal)e.Item.FindControl( "llHtml ");
Label lblid = (Label)e.Item.FindControl( "lblTitleId ");
Label lbl=(Label)e.Item.FindControl( "lbloption ");
//string option;
&nbs