0

我将 msaccess db 绑定到 asp.net 表。对于备注字段,文本在 html 表格单元格中围绕它们有 div 标签,最终用户会按字面意思显示。

有没有办法避免这些 div ?

aspx的源代码:

    <asp:GridView ID="GridView1" runat="server">
    </asp:GridView>

.cs 的来源:

        myDB = "MyDB";
        myConString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|" + myDB + ".accdb;Persist Security Info=False;Jet OLEDB:Database Password=;";
        OleDbConnection myDataCon = new OleDbConnection(myConString);

        myDataCon.Open();


        OleDbCommand dbCom = new OleDbCommand("Select * FROM Test", myDataCon);
        OleDbDataReader dataReader = dbCommand.ExecuteReader();

        GridView1.DataSource = dataReader;
        GridView1.DataBind();

        dataReader.Close();
        myDataCon.Close();
4

0 回答 0