for(int i=0;i<Convert.ToInt16(schemaTable.Rows.Count);i++)
{
LinkButton LB=new LinkButton();
TableList[i]=schemaTable.Rows[i]["TABLE_NAME"].ToString();
LB.Text=schemaTable.Rows[i]["TABLE_NAME"].ToString();
//动态添加控件
((HtmlTableCell)this.FindControl("SelectName")).Controls.Add(LB);
LB.Click=//这里怎么写?
}我想在LinkButton的Click事件里连接数据库,该怎么写?
{
LinkButton LB=new LinkButton();
TableList[i]=schemaTable.Rows[i]["TABLE_NAME"].ToString();
LB.Text=schemaTable.Rows[i]["TABLE_NAME"].ToString();
//动态添加控件
((HtmlTableCell)this.FindControl("SelectName")).Controls.Add(LB);
LB.Click=//这里怎么写?
}我想在LinkButton的Click事件里连接数据库,该怎么写?
but if your application is web application, maybe your control will disappear
/// <summary>
/// 每页显示记录数
/// </summary>
public int TopRecord
{
get
{
try
{
return (int)ViewState ["TopRecord"];
}
catch
{
return Convert.ToInt32(System.Configuration.ConfigurationSettings.AppSettings["PgeSize"]);
}
}
set
{
ViewState["TopRecord"]=value;
}
}
#endregion