我为您提供了解决方案,您无需实现“InternalPageCustom”,只需在您的母版页中使用代码内联即可。
前任:
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (Request.QueryString["id"] == null)
{
return;
}
var id = Request.QueryString["id"];
var pageTitle = string.Empty;
var pageDescription = string.Empty;
var pageKeyword = string.Empty;
var propertyId = Guid.Parse(id);
if (propertyId != Guid.Empty)
{
const string culture = "en";
//Method use for get dynamic title, Description and Keyword.
PropertyHelper.SetPageInfo(propertyId, culture, out pageTitle, out pageDescription, out pageKeyword);
}
Page.Title = pageTitle;
Page.MetaDescription = pageDescription;
Page.MetaKeywords = pageKeyword;
}
==> 将此代码推送到您的母版页。希望这对您有所帮助。