解决方案 »
- ADODB.Recordset 错误 '800a0e79'对象打开时,不允许操作。/投票系统/toupiao.asp,行 18
- 用户控件中的验证不起作用?
- Active X 控件是什么?它的作用是什么?为什么我们要使用它?怎么使用它?
- [求助]问个简单问题?
- 关于sql server数据库的连接形式
- 大家介绍一下Sql2005的使用体验
- 一个有趣的加密与机密问题,看你是否能做出来!!
- 用xml进行多个主机间的 数据交互
- 求助 服务器上TREEVIEW控件 不能点.显示JS错误 其他也是反正JS错误了.
- 问一个版面排版的问题。简单!
- VS2013智能提示莫名错误
- asp.net程序中怎么操作SQLSEVER数据库!!??求大神帮忙!
string content1=dt.Rows[0]["title"].Replace("\r\n","<br><br>");
string content=content1.Replace(" "," ");
<td class="style3" id="article" align="center">
<asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine" Height="504px"
style="margin-left: 0px" Width="722px"></asp:TextBox> </td>
</tr>
protected void Page_Load(object sender, EventArgs e)
{
using (SqlConnection con = new SqlConnection("Data Source=jj台式机\\SQLEXPRESS;Initial Catalog=jj;Integrated Security=True"))
{
con.Open();
using (SqlCommand cmd = con.CreateCommand())
{
cmd.CommandText = "select article from school where id = 2 ";
SqlDataReader a;
a = cmd.ExecuteReader();
if (a.Read())
{
TextBox1.Text = a[0].ToString();
}
}
}
}
数据库里就建了一个text类型的列,放了几个字在里面
或者使用HttpContext.Current.Server.HtmlEncode