<title id="mytitle" runat="server"></title>in C# code:
mytitle.InnerText = "Hello World";if you use code behind, declare in your page class:
protected HtmlGenericControl mytitle;you can also use javascript:
document.title = "Hello World";

解决方案 »

  1.   

    this.Controls.Add(new LiteralControl("<title>标题</title> "));
      

  2.   

    楼上的两位,我是在VB.net中写,用你们的方法都不行啊,怎么搞
      

  3.   

    <title id="mytitle" runat="server"></title>
    mytitle.InnerText = "Hello World"if you use code behind, declare in your page class:Imports System.Web.UI.HtmlControlspublic class myCodeBehind : Inherits System.Web.UI.Page
       public mytitle as HtmlGenericControl....end class
      

  4.   

    在“HTML”中改完之后,
    千万记得先保存再返回“设计”中,
    否则dotnet的语法自动检查
    会把runat="server"语句删除
    很惨哦:(