Dim ConnString As String = "Data Source=localhost;" & _
"Initial Catalog=数据库名;User ID=sa;Password=123456" Dim objCmd As New SqlDataAdapter("Select distinct * From 表名 &_
Where 字段名='"& 文本名.text &"'", ConnString) Dim DS As New DataSet()
objCmd.Fill(DS, "表名")
Dim myTable As DataTable = DS.Tables("表名")
Dim mycount as integer=myTable.rows.count
if mycount = 0 then
response.redirect("b.aspx")
else
response.redirect("a.aspx")
end if这是我写的 代码 请高手帮忙改一改 主要目的是验证用户名是否重复
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货