手机
当前位置:查字典教程网 >编程开发 >asp.net教程 >内容添加asp.net
内容添加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编程精选25种函数源程序

asp.net文件上传示例

asp.net图片上传实例

asp.net读取excel文件的三种方法示例

ASP.NET jQuery 实例8 (动态添加内容到DropDownList)

asp.net(c#) ubb处理类

asp.net 无重复随机数代码

asp.net(c#)利用构造器链的代码

如何改变asp.net项目名称

ASP.NET 2005 Treeview终极解决方案

精品推荐
分类导航