<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="WebApplication1._Default" %>
<%@ Import Namespace ="system.data" %>
<%@ Import Namespace ="system.data.sqlclient" %>
<script runat="server">
Dim obj_con As SqlConnection
Dim obj_cmd As SqlCommand
Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim con As String
con = "server=TAKNAJA;uid=taknaja;password=;database=web;"
obj_con = New SqlConnection(con)
obj_con.Open()
If obj_con.State = ConnectionState.Open Then
Me.lb.Text = "ok"
Else
Me.lb.Text = "no"
End If
End Sub
Sub Page_Unload()
obj_con.Close()
obj_con = Nothing
End Sub
</script>