c# 在UpdatePanel后台执行前台JS方法

 string msg = string.Format(@"
                document.getElementById('{0}').style.backgroundImage = 'url(images/huangdi.jpg)';
                document.getElementById('{1}').style.backgroundImage = 'url(images/niubei.jpg)';", pageName1, pageName2);
            ScriptManager.RegisterStartupScript(upName, upName.GetType(), Guid.NewGuid().ToString(), msg, true);
原文地址:https://www.cnblogs.com/yinchengliang/p/1946314.html