当前位置: 移动技术网 > IT编程>开发语言>.net > 内容添加asp.net

内容添加asp.net

2018年04月28日  | 移动技术网IT编程  | 我要评论

揭20元人民币中隐藏的惊天秘密,花瑶花怎么样,三维扫描仪报价

private void button1_click(object sender, system.eventargs e)
        {
            if(this.isvalid){
            oledbconnection conn=dbconn.createconn();
                conn.open();
                oledbcommand cmd=new oledbcommand();
                cmd.commandtext="insert into a(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();
                }
            }
        }

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网