紧急求助!!!文章分页,却显示为HTML格式,图片显示不出来!!
一篇文章text型,用@division@分割,显示出来却是html格式,
修改文章:
SqlConnection conn = db.conn();
try
{
DataAccess.SqlHelper.ExecuteNonQuery(conn, CommandType.Text, "update Products set Details= ' " + FreeTextBox1.Text + " 'where ProductID=3 ");
Response.Redirect( "Default5.aspx ");
}
catch(Exception ex)
{
Response.Write(ex.Message);
}
---------------
分页代码:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
fill();
}
}
public void fill()
{
SqlConnection conn = db.conn();
string cont = DataAccess.SqlHelper.ExecuteScalar(conn, CommandType.Text, "select Details from Products where ProductID=3 ").ToString();
string[] ary = System.Text.RegularExpressions.Regex.Split(cont, "@division@ ");
//建立一个DataSet将取到的数据放到里面去;
DataSet ds = new DataSet();
ds.Tables.Add( "cont ");
ds.Tables[ "cont "].Columns.Add( "content ");
for (int i = 0; i < ary.Length; i++)
{
ds.Tables[ "cont "].Rows.Add(ary[i]);
}
GridView1.DataSource = ds;
GridView1.DataBind();
GridView1.AllowPaging = true;
-------------------怎么回事???
System.Text.RegularExpressions.Regex.Split把文章转化为html??
怎么解决???
[解决办法]
哦~