pigmentarts
asked on
error Statement cannot appear within a method body. End of method assumed.
i get this error anyone help?
Compiler Error Message: BC30289: Statement cannot appear within a method body. End of method assumed.
Source Error:
Line 102: #End ExternalSource
Line 103:
Line 104: Public Sub New()
Line 105: MyBase.New
Line 106: Dim dependencies As System.Collections.ArrayLi st
Source File: C:\WINDOWS\Microsoft.NET\F ramework\v 1.1.4322\T emporary ASP.NET Files\connectinglondon\612 30c6b\282a b1ea\xgmml i6w.0.vb Line: 104
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859 -1" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.Ole Db" %>
<html>
<script language="VB" runat="server">
Sub Submit_Click(Sender as Object, e as EventArgs)
Dim cnn = New OleDbConnection("Provider= Microsoft. Jet.OLEDB. 4.0; data source=" & server.mappath("cl.mdb"))
Dim cmd As New OleDb.OleDbCommand
Dim dr As Oledb.OleDbDataReader
cmd.Connection = cnn
cmd.CommandText = "SELECT email, pass FROM members WHERE email = " & email.Value & "AND pass = " & pass.Value
cnn.Open()
dr = cmd.ExecuteReader(commandb ehavior.cl oseconnect ion)
While dr.read
Session("email") = dr.item("email")
Session("pass") = dr.item("pass")
End While
If Not IsDBNull(Session("email")) Then
'You found a match do whatever
Else
'you didn't find a match do whatever
End If
cnn.Close()
cmd.Dispose()
cnn.Dispose()
</script>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form runat="server">
<table width="auto" border="0">
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Email Address: </td>
<td><input type="text" ID="email" value="" runat="server"></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" ID="pass" value="" runat="server"></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" OnServerClick="Submit_Clic k" value="Submit" runat="server"></td>
</tr>
</table>
</form>
</body>
</html>
Compiler Error Message: BC30289: Statement cannot appear within a method body. End of method assumed.
Source Error:
Line 102: #End ExternalSource
Line 103:
Line 104: Public Sub New()
Line 105: MyBase.New
Line 106: Dim dependencies As System.Collections.ArrayLi
Source File: C:\WINDOWS\Microsoft.NET\F
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.Ole
<html>
<script language="VB" runat="server">
Sub Submit_Click(Sender as Object, e as EventArgs)
Dim cnn = New OleDbConnection("Provider=
Dim cmd As New OleDb.OleDbCommand
Dim dr As Oledb.OleDbDataReader
cmd.Connection = cnn
cmd.CommandText = "SELECT email, pass FROM members WHERE email = " & email.Value & "AND pass = " & pass.Value
cnn.Open()
dr = cmd.ExecuteReader(commandb
While dr.read
Session("email") = dr.item("email")
Session("pass") = dr.item("pass")
End While
If Not IsDBNull(Session("email"))
'You found a match do whatever
Else
'you didn't find a match do whatever
End If
cnn.Close()
cmd.Dispose()
cnn.Dispose()
</script>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form runat="server">
<table width="auto" border="0">
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td>Email Address: </td>
<td><input type="text" ID="email" value="" runat="server"></td>
</tr>
<tr>
<td>Password:</td>
<td><input type="password" ID="pass" value="" runat="server"></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" OnServerClick="Submit_Clic
</tr>
</table>
</form>
</body>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER