后台
    Private otheritem As System.Web.UI.HtmlControls.HtmlContainerControl
前台
<span id="otheritem"  runat="server"></span>
无论我怎么写我都插入不了数据otheritem.InnerText or otheritem.InnerHtml都不行,为什么呢?

解决方案 »

  1.   

    呵呵,用那个placeHolder多好啊,用什么span阿,晕
      

  2.   

    otheritem.InnerText or otheritem.InnerHtml都不行,为什么呢?=========================
    你应该这么做
    在前台:
    <span id="otheritem" runat="server"></span>
    在后台代码写
    otheritem.innerText="你好啊"这样就可以了嘛
      

  3.   

    Private otheritem As System.Web.UI.HtmlControls.HtmlContainerControl这句要去掉,不用这句啊
      

  4.   

    首先呢建议用 Label, 因为.net会把Label 转为span然后呢,java对大小写是很敏感的otheritem.innerText or otheritem.innerHTML一定要注意大小写另:HTML是缩写,所以都要大写
    Text是单词,所以只是头字母大写。
      

  5.   

    Private otheritem As System.Web.UI.HtmlControls.HtmlContainerControl这句要去掉,不用这句啊???
    这样你试过吗?去掉?没搞错吧?编译的时候会提示你otheritem未定义。今天来这样写又可以了,不知道是不是系统问题,呵呵~~~给分
      

  6.   

    Protected WithEvents span1 As System.Web.UI.HtmlControls.HtmlGenericControl
    哦,上面写法错了,应该是下面的,呵呵,粗心
        Private span1 As System.Web.UI.HtmlControls.HtmlContainerControl