内容添加asp.net
摘要:privatevoidButton1_Click(objectsender,System.EventArgse){if(this.IsVal...
privatevoidButton1_Click(objectsender,System.EventArgse)
{
if(this.IsValid){
OleDbConnectionconn=dbconn.createconn();
conn.Open();
OleDbCommandcmd=newOleDbCommand();
cmd.CommandText="insertintoa(title,content)values('"+this.title.Text.Trim().Replace("'","")+"','"+this.content.Text.Trim().Replace("'","")+"')";
cmd.Connection=conn;
try
{
cmd.ExecuteNonQuery();
this.title.Text="";
this.content.Text="";
this.add_info.Text="提交成功";
}
catch
{
this.add_info.Text="出现错误";
}
finally{
conn.Close();
}
}
}
【内容添加asp.net】相关文章:
★ ASP.NET jQuery 实例8 (动态添加内容到DropDownList)
上一篇:
repeater分页 内容显示
下一篇:
VS2003 SP1发布