如题,在线等!!

解决方案 »

  1.   

    private void TextBox1_TextChanged(object sender, System.EventArgs e)
    {
      this.TextBox1.SelectionStart = this.TextBox1.Text.Length;
      this.TextBox1.SelectionLength = 0;
      this.TextBox1.ScrollToCaret();
    }
      

  2.   

    不行啊,那是windows form中方法和属性,web.UI.WebControls.textbox没有这些属性和方法啊
      

  3.   

    演示代码
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>无标题页</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <asp:TextBox ID="TextBox1" runat="server" Height="70px" TextMode="MultiLine" Width="328px">[公告]     论坛性能升级啦,有意见来这里反馈!
    [公告]   CSDN   女程序员、女ITer、   集合报到帖!
    [置顶]   [交流:活跃气氛]VS.NET开发中的小技巧
    [置顶]   .NET版版规(版本1.0)
    [置顶]   SQLserver数据文件(MDF)的页面文件头结构剖析  </asp:TextBox>
        </div>
        </form>
        <script type="text/javascript">
        function gotoEnd(){
         var obj=document.getElementById("<%=TextBox1.ClientID %>");
         var r =obj.createTextRange();
         r.moveStart('character',obj.value.length);
         r.collapse(true);
         r.select();
        } 
        gotoEnd();
        </script>
    </body>
    </html>