用HtmlInputRadio怎样把图片写入数据库或是把图片地址写入数据库////大虾救命!!!
qqok 2002-10-14 07:52:20 像这个留言薄
http://www21.brinkster.com/hiokdesign/index.aspx
-----------------------------------------------------
代码如下:
-----------------------------------------------------
Sub add(sender As Object, e As ImageClickEventArgs)
Dim ConnStr, SQL As String
SQL = "Insert Into main (Name,face,content,addtime) Values ('"& name.Value &"','"& request.form("face") &"','"& Content.Value &"','"& DateTime.Now &"')"
ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & Server.MapPath("hiokgb.mdb")
Dim Conn As OleDbConnection = New OleDbConnection(ConnStr)
Conn.Open()
Dim Cmd As OleDbCommand = New OleDbCommand(SQL, Conn)
Cmd.ExecuteNonQuery()
response.redirect("index.aspx")
end sub
--------------------------------------------------------------
<input type="radio" name="emot" value="1" checked>
<img src="images/emot/1.gif" width="16" height="16">
<input type="radio" name="emot" value="2">
<img src="images/emot/2.gif" width="16" height="16">
<input type="radio" name="emot" value="3">
<img src="images/emot/3.gif" width="16" height="16">
<input type="radio" name="emot" value="4">
<img src="images/emot/4.gif" width="16" height="16">
<input type="radio" name="emot" value="5">
<img src="images/emot/5.gif" width="16" height="16">
<input type="radio" name="emot" value="6">
<img src="images/emot/6.gif" width="16" height="16">
<input type="radio" name="emot" value="7">
<img src="images/emot/7.gif" width="16" height="16"> </td>