Imports System.Data
Imports System.Data.SqlClient
Public Class _Default
Inherits System.Web.UI.Page
Dim conn As SqlConnection
Dim cmd As SqlCommand
Public Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim user As String = Session("username")
Dim pass As String = Session("pass")
Dim con As String = "server=TAK\SQLEXPRESS ; uid=sa; pwd=1234; database=web;"
conn = New SqlConnection(con)
conn.Open()
'Response.Write(user)
Dim sql As String = "SELECT count (*) FROM member WHERE username = ' ' "
cmd = New SqlCommand(sql, conn)
Dim chk As Integer = (cmd.ExecuteScalar())
If chk <= 0 Then
'Response.Write(user)
Else
Response.Write("yes")
End If