在aspx文件里面放置一个<div name=divTest></div>在cs:
Response.Write("<Script language=javascript>windonw.document.all.divTest.innerHtml='" + "你要输出的文字" + "';</script>");

解决方案 »

  1.   

    还有一种方法就是Table 设为服务器端的,然后可以用table 的行或列来控制输出!
      

  2.   

    在asp.net中,用Response.Write方法输出的内容总是在所有页面内容之前发送,这和asp是不同的,要在固定位置显示相应内容,应该用相应的控件而不是Response.Write。
      

  3.   

    用Label替换掉或者在html里面用<%=你的变量名%>变量在后台代码
      

  4.   

    在要显示的地主用LABEL控件显示数据.
      

  5.   

    Literal控件是最好解决方案,比LABEL要好
      

  6.   

    还是用数据绑定吧,不过据说用Response.Write效率是最高的
      

  7.   

    没错就用label
    这个很好的!!1
      

  8.   

    最好用PlaceHolder,因为Response.Write只会在流的最前面!这样实际上是破坏了流。
    PlaceHolder1.Controls.Add(new LiteralControl("***content***"));
    这样就输出了content,记住,content可以是任意的HTML内容!
      

  9.   

    If (Not IsClientScriptBlockRegistered("clientScript")) Then
                    RegisterClientScriptBlock("clientScript", showOpen)
                End If
      

  10.   

    to: rickjelly2004(rickjelly) If (Not IsClientScriptBlockRegistered("clientScript")) Then
                    RegisterClientScriptBlock("clientScript", showOpen)
                End If
    是什么意思?解释一下吧,看不懂
      

  11.   

    http://community.csdn.net/Expert/FAQ/FAQ_Index.asp?id=202http://search.csdn.net/Expert/topic/661/661396.xml?temp=.8012354