过来看看!·!
下面的代码 ,当提示“只能选一个”的时候,会出现 Response.Write(CType(x.FindControl("getvalue"), Label).Text)的内容 怎么回事???
Dim x As DataGridItem
Dim i As Integer = 0
For Each x In DataGrid1.Items
If CType(x.FindControl("che"), CheckBox).Checked = True Then
i = i + 1
If i >= 2 Then
Response.Write("<script>alert('只能选一个');</script>")
Exit For
Exit Sub
response.end()
End If
Response.Write(CType(x.FindControl("getvalue"), Label).Text)
End If
Next