请教各位高手:文章保存到数据库的时候怎样同时保存他的段落格式!送高分!
/////我的提交保存代码。////
DateTime now=DateTime.Now ;
SqlConnection MyConn=new SqlConnection(Application["MyConn"].ToString());
MyConn.Open ();
publishtime1=publishtime1 +"-"+yue+"-"+ri+"";
string str="insert into kyzt(title,province,sort,people,telephone,postcord,address,info,keyword,publishtime,time,sign ) values('"+title.Text+"','"+province.SelectedItem.Text +"','"+sort.SelectedItem.Text+"','"+people.Text +"','"+telephone.Text+"','"+postcord.Text+"','"+address.Text+"','"+info.Text+"','"+keyword.Text+"','"+publishtime1+"','"+now.Date+"',0)";
SqlCommand MyCmd=new SqlCommand (str,MyConn);
MyCmd.ExecuteNonQuery();
/////
/////我的提交保存代码。////
DateTime now=DateTime.Now ;
SqlConnection MyConn=new SqlConnection(Application["MyConn"].ToString());
MyConn.Open ();
publishtime1=publishtime1 +"-"+yue+"-"+ri+"";
string str="insert into kyzt(title,province,sort,people,telephone,postcord,address,info,keyword,publishtime,time,sign ) values('"+title.Text+"','"+province.SelectedItem.Text +"','"+sort.SelectedItem.Text+"','"+people.Text +"','"+telephone.Text+"','"+postcord.Text+"','"+address.Text+"','"+info.Text+"','"+keyword.Text+"','"+publishtime1+"','"+now.Date+"',0)";
SqlCommand MyCmd=new SqlCommand (str,MyConn);
MyCmd.ExecuteNonQuery();
/////
public static string TransStringTool(string aTransString)
{
aTransString = aTransString.Replace("&","&");
aTransString = aTransString.Replace("<","<");
aTransString = aTransString.Replace(">",">");
aTransString = aTransString.Replace(" "," ");
aTransString = aTransString.Replace("\n","<br>");
return aTransString;
}