protected override void LoadViewState(object savedState) { base.LoadViewState(savedState); if (IsDynamicLoadControl) { accTable ac = new accTable(); ac.generator(_dt, GridView1); } }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } SqlConnect conn = new SqlConnect(); DataTable dt = new DataTable(); accTable at = new accTable(); string tablerdn = "1"; Inital(ref tablerdn); dt = conn.ExcuteSelect("select * from dbo.JCI_report_mainTable where tableRdn=" + tablerdn); _dt = dt; at.generator(dt, GridView1); IsDynamicLoadControl = true; }