Thursday, December 17, 2015

useful

TTFB -- Time To First Byte 

Merge Datatable or DataSet

        con.Open();
        SqlDataAdapter adp = new SqlDataAdapter("select * from Reg", con);
        DataSet ds1 = new DataSet();
        adp.Fill(ds1);     
        adp = new SqlDataAdapter("select * from sale", con);
        DataSet ds2 = new DataSet();
        adp.Fill(ds2);      
        ds1.Merge(ds2,true);    
        if (ds1.Tables[0].Rows.Count > 0 && ds2.Tables[0].Rows.Count>0)
        {
            GridView1.DataSource = ds1;
            GridView1.DataBind();
        }
        con.Close();

aliasing directives

using Sess=System.Web.HttpContext;