页面动态注册脚本(小技巧)

this.Page.ClientScript.RegisterStartupScript(this.GetType(), "MyScript", "function LogOffFunction() { if (confirm('Are you sure you logoff')) {return true;} else {return false;} }", true);
        Button1.Attributes.Add("onclick", "return LogOffFunction()");
原文地址:https://www.cnblogs.com/cuihongyu3503319/p/1257374.html