Loading images Faster in Webpage

前端 未结 14 2063
死守一世寂寞
死守一世寂寞 2020-12-30 23:39

In the web application when i click on a link that should load an image from server, it is taking too much time since the images are sized approxmately 3MB - 5 MB, we are un

14条回答
  •  旧时难觅i
    2020-12-31 00:09

    Try Loading It Dynamically Using The Back Code In Your .CS File Such As

    .ASPX

    
        
            
        
        
    

    .CS

        GallerySTR = ConfigurationManager.ConnectionStrings["PPDB"].ConnectionString;
        GalleryCN = new SqlConnection(GallerySTR);
    
        string LoginQuery = "SELECT * FROM Albums";
        GalleryCN.Open();
        GalleryCMD = new SqlCommand(LoginQuery, GalleryCN);
    
        GalleryDA = new SqlDataAdapter(GalleryCMD);
        GalleryDS = new DataSet();
        GalleryDA.Fill(GalleryDS);
        Repeater1.DataSource = GalleryDS;
        Repeater1.DataBind();
    

    This is my code using ASP.NET Repeater COntrol i hope this gives you an idea for the faster loading ;) always try to load it dynamically ;) Loading Images Dynamically Gives The Best Results cuz the truth is you cannot reduce the size ;)

提交回复
热议问题