急!!!!!在线等!!!在线投票系统!~!!!出现下面的错误提示,不知道怎么修改?(错误提示+源代码)
运行时错误提示:
“/”应用程序中的服务器错误。
--------------------------------------------------------------------------------
编译错误
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。
编译器错误信息: BC30408: 方法“Public Sub diaocha()”没有与委托“Delegate Sub EventHandler(sender As Object, e As System.EventArgs)”相同的签名。
源错误:
行 478: <tr>
行 479: <td>
行 480: <div align="center"><font color="#ff6600"><asp:button id="Button1" onclick="diaocha" runat="server" Text="我 要 投 票"></asp:button></font></div>
行 481: </td>
行 482: </tr>
源文件: D:\zyweb\index.aspx 行: 480
源代码:
Sub diaocha(ByVal sender As Object, ByVal e As System.EventArgs)
Dim k, i, j As Integer
Dim per(3) As Single
Dim result(3) As String
Dim id(3) As String
Dim txtreader As StreamReader
Dim txtwriter As StreamWriter
Dim trecord, votefile As String
Dim sum As Long
k = Request.Form("radiobutton")
votefile = Server.MapPath("diaocha.txt")
txtreader = File.OpenText(votefile)
i = 0
Do
trecord = Trim(txtreader.ReadLine())
If trecord <> "" Then
id(i) = Trim(Left(trecord, 2))
result(i) = Trim(Right(trecord, Len(trecord) - 2))
sum += CLng(result(j))
per(j) = CLng(result(j)) / sum
Session("0") = per(0)
Label6.Text = result(0)
Session("1") = per(1)
Label7.Text = result(1)
Session("2") = per(2)
Label8.Text = result(2)
Session("3") = per(3)
Label9.Text = result(3)
If i = k Then
j = CInt(result(i)) + 1
result(i) = Trim(CStr(j))
End If
i = i + 1
End If
Loop Until trecord = ""
txtreader.Close()
txtwriter = File.CreateText(votefile)
For j = 0 To (i - 1)
txtwriter.WriteLine(id(j) & " " & result(j))
Next
txtwriter.Close()
End Sub