| 发表于:2007-01-17 13:57:52 楼主 |
private void imagebutton1_click(object sender, system.web.ui.imageclickeventargs e) { if(this.isvalid) { addtime=system.datetime.now.tostring(); int face=convert.toint32(request.form[ "face "].tostring()); //表情显示 sqlconnection acconn=db.createconnection(); try { acconn.open(); string acsqli= "insert into lyb(zuti,name,lianxidizhi,dianhua,qq,mail,www,face,content,addtime) values ( ' "+this.zuti.text+ " ', ' "+this.name.text+ " ', ' "+this.lianxidizhi.text+ " ', ' "+this.dianhua.text+ " ', ' "+this.qq.text+ " ', ' "+this.mail.text+ " ', ' "+this.www.text+ " ', "+face+ ", ' "+this.content.text.tostring().replace( "\r\n ", " <br> ")+ " ', ' "+addtime+ " ') "; sqlcommand accommi=new sqlcommand(acsqli,acconn); accommi.EXECutenonquery(); response.write( " <script> alert( '留言成功添加 '); </script> "); } catch(exception ex) { response.write(ex.tostring()); } finally { acconn.close(); } } } int face=convert.toint32(request.form[ "face "].tostring())这里出错了 这个代码中的face(表情)让我在aspx页面中把所有的表情删除了.在aspx.cs这个页面中我需要怎么改 教教小弟吧!!! |
|
|
|
|