HTML:中 <title id="mytitle" runat="server"> --------------------------------------- codebehind中: Protected WithEvents mytitle As HtmlGenericControl Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click mytitle.InnerText = "test" End Sub
在后台代码类里手工加入:
protected System.Web.UI.HtmlControls.HtmlGenericControl PageTitle;
然后:
PageTitle.InnerHtml="asdfsdfsd";就OK了
<title id="mytitle" runat="server">
---------------------------------------
codebehind中:
Protected WithEvents mytitle As HtmlGenericControl Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
mytitle.InnerText = "test"
End Sub