string strPath = this.Page.Request.ServerVariables["PATH_INFO"];
string strPageName = strPath.Substring(strPath.LastIndexOf("/") + 1);//引用此控件的页面名
string strPageName = strPath.Substring(strPath.LastIndexOf("/") + 1);//引用此控件的页面名
本文介绍了一种从当前页面请求中提取特定路径信息的方法。通过使用 .NET 的 ServerVariables 获取 PATH_INFO,然后进一步解析出页面名称。
332

被折叠的 条评论
为什么被折叠?