ASP.Net
1.获取页面名字
string pageName = System.IO.Path.GetFileName(HttpContext.Current.Request.Path);
2.弹出提示框
Page.ClientScript.RegisterStartupScript(this.GetType(), "message", "<script>alert('提示消息')</script>");
3.继承了母版页的子页面调用js代码
子页面js代码引用写成...
<script language="javascript" src='<%=ResolveClientUrl("~/js/xx.js")'></script>
var pwd = document.getElementById("<%=txtPassword.ClientID %>").value.length;
4.解决AJAX中使用UpdatePanel后再用Response.Write();
用System.Web.UI.ScriptManager.RegisterStartupScript来替代Page.ClientScript.RegisterStartupScript