当然可以了。居中显示,你只要在ItemTemplate中定义一个<div align="center">...</div>就可以了。如果保留换行,你可以使用string对象的Replace方法,将"\n"替换为"<br>",空格替换为"&nbsp"

解决方案 »

  1.   

    建个表格(table)
    其中的格式用html语法控制
      

  2.   

    <asp:textbox id=content runat=server textmode=multiline rows=5 columns=20 />
    在buttonclick中
    sub buttonclick(sender as object, e as eventargs)
    dim thecontent as string
    thecontent=content.text
    thecontent=thecontent.replace(" ","&nbsp;")
    thecontent=thecontent.replace("chr(13) ","<br>") //替换空格
    strsql="insert into tables(content)values('" & thecontent & "') //替换回车换行
    ............
    end sub
      

  3.   

    string strshow=HttpUtility.HtmlEncode(show.Text.ToString());
    strshow=strshow.Replace("\n","<br/>");
    strshow=strshow.Replace(" ","&nbsp;");
    strshow=strshow.Replace("\r\n","<br/>\r\n");myCommand.Parameters.Add(new SqlParameter("@文档内容", SqlDbType.NText));
    myCommand.Parameters["@文档内容"].Value =strshow;