以前的的發送消息按鈕事件改寫如下:
'/////////////////////轉到發送即時消息頁面
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim i, j As Integer
j = 0
Dim tostu_id As String = ""
For i = 0 To mycheck.Items.Count - 1
If mycheck.Items(i).Selected Then
'////////////////////////限制發送條數
j = j + 1
If j < 6 Then
'/////////////////////參數構造
tostu_id = tostu_id & CheckBoxList1.Items(i).Text & "@"
Else
Label2.Visible = True
Label2.Text = "一次最多能給五個用戶發送信息!"
Return
'Response.Write("<script language=JavaScript>window.open('info.aspx?tostu_id=' & CheckBoxList1.Items(i).Text,'','height=330,width=560,status=no,location=no,toolbar=no,directories=no,menubar=no')</script>")
End If
End If
Next i
Response.Redirect("info.aspx?tostu_id=" & tostu_id)
End Sub
這裡發送信息的頁面由於修改的比較多,所以把全部代碼全都抓來了,呵呵:)