⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ini_answer.inc

📁 该软件是采用微软的.net技术编写的bbs论坛
💻 INC
字号:
<script language="VB" runat="server">
sub btnanswer_click(sender as object,e as eventargs)
   if txtanswer.text="" then
   lblerrormessage.text="回复不能为空,否则视为灌水!"
   lblerrormessage.forecolor=color.red
   exit sub
   end if
   dim strconn as string
   strconn="data source=localhost;uid=sa;pwd=chicken;database=mybbs"
   dim myconn as sqlconnection
   myconn=new sqlconnection(strconn)
   dim mycomm as sqlcommand
   dim strinsert as string
   strinsert="insert into follower (num,follower,content,followtime) values "
   strinsert=strinsert & "('" & cint(request.QueryString("id")) & "',"		'用get方法传来的帖子号
   strinsert=strinsert & "'" & session("id") & "',"			'用户的id
   strinsert=strinsert & "'" & txtanswer.text & "',"
   strinsert=strinsert & "'" & now & "')"
   mycomm=new sqlcommand(strinsert,myconn)
   myconn.open()
   try
     mycomm.executenonquery()
	 myconn.close()
	 response.Redirect("content.aspx?id=" & request.QueryString("id"))		'刷新一次
	 catch ex as sqlexception
	 lblerrormessage.text="帖子添加错误,请重试。"
	 lblerrormessage.forecolor=color.red
	 myconn.close()
    end try
   
   
end sub
</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -