Monday, September 3, 2012

download Image file or text file in update panel


To download image or text file in update panel use this code on page load :


            LinkButton lbDownload = (LinkButton)e.Row.FindControl("lnkView");
            ScriptManager current = ScriptManager.GetCurrent(Page);
            if (current != null)
                current.RegisterPostBackControl(lbDownload);