类型“GridView”的控件“ctl02”必须放在具有 runat=server 的窗体标记内。
public override void VerifyRenderingInServerForm(Control control)
{
// Confirms that an HtmlForm control is rendered for
}
控件数组:
GridView[] gvs = new GridView[4];
gvs[0] = new GridView();
gvs[0].DataSource = ds.Tables[0];
gvs[0].DataBind();
this.Page.Controls.Add(gvs[0]);
gvs[1] = new GridView();
gvs[1].DataSource = ds.Tables[0];
gvs[1].DataBind();
this.Page.Controls.Add(gvs[1]);
select f_shefenhao,
case when len(f_shefenhao)=15
then
'19'+ substring(f_shefenhao,7,2)+'-'+substring(f_shefenhao,9,2)+'-'+substring(f_shefenhao,11,2)
else substring(f_shefenhao,7,4)+'-'+substring(f_shefenhao,11,2)+'-'+substring(f_shefenhao,13,2)
end as '出生年月日',case when len(f_shefenhao)=15 and substring(f_shefenhao,9,2)=month(getdate()) and substring(f_shefenhao,11,2)=day(getdate())
then '生日' when len(f_shefenhao)=18 and substring(f_shefenhao,11,2)=month(getdate()) and substring(f_shefenhao,13,2)=day(getdate()) then 'bir' end as '生日情况'
from k_teacher_info