我的页面在标题中有特殊字符以进行正确的排版,例如它说 Exchange '07 Groups" 带有正确的撇号,而不是单引号。撇号的 HTML 实体是‘
所以,我发现如果我从 VB 设置页面标题,标题显示得很好,但是一旦更新面板更新 HTML 实体被重新编码并错误地显示为“Exchange ‘07 Groups”
所以这是我的代码,我只需设置页面标题,然后是更新面板和更新它的按钮......
<script runat="server">
Protected Sub Page_Load(...) Handles Me.Load
Page.Title = "Exchange ‘07 Groups"
End Sub
Protected Sub uxLnkDoClick(ByVal sender As Object, ByVal e As System.EventArgs)
uxLitLoaded.Text = "Loaded!"
End Sub
</script>
<!DOCTYPE html>
<html>
<head runat="server"></head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager runat="server"></asp:ScriptManager>
<asp:UpdatePanel runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:LinkButton runat="server" ID="uxLnkDo" OnClick="uxLnkDoClick" Text="Do Something" />
<asp:Literal runat="server" ID="uxLitLoaded" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="uxLnkDo" />
</Triggers>
</asp:UpdatePanel>
</form>
</body>
</html>
关于这个还能做什么?