Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: Stuck with a Class Problem


Message #1 by "Hugh McLaughlin" <hugh@k...> on Tue, 5 Mar 2002 22:01:31
Hello Everyone and thanks for your help in advance.  I am developing a 

form the takes in a user's login name and password and then validates it 

against a SQL Server database.  At the present time, the code should 

simply spit back the record that was found.  But for some reason, it 

appears that I am not getting the parameter passed correctly to the class 

and function.  I am receivng the following error:



Compiler Error Message: BC30455: Argument not specified for 

parameter 'strLogin' of 'Public Function ValidateLogin(strLogin As String, 

strPassword As String) As Object'.



The code for the page is listed below:



<%@ Import Namespace="System.Data" %>

<%@ Import Namespace="System.Data.SqlClient" %>

<script language="vb" runat="server">



'Namespace KidsPortal



	Public Class PortalSecurity



		Public Function ValidateLogin(ByVal strLogin As String, 

ByVal strPassword As String)



			Dim myConnection As New SqlConnection

(ConfigurationSettings.AppSettings("connectionString"))



			Dim SQL As String = "SELECT * from tblUser WHERE 

szUserName = " & "'" & strLogin & "'" & "AND szPassword = " & "'" & 

strPassword & "';"



      			Dim myCommand As New SQLDataAdapter

(SQL,myConnection)



			Dim myDataset AS New DataSet



			myCommand.Fill(myDataSet)



			Return myDataset



		End Function



	End Class



'End Namespace







	Sub LoginBtn_Click(Sender As Object, E As ImageClickEventArgs)



		Dim AccountSystem As New PortalSecurity()

		AccountSystem.ValidateLogin(Login.Text, Password.Text)

		Dim myRecordSet As New PortalSecurity()



		myDatagrid.DataSource=myRecordSet.ValidateLogin



		Page.Databind()

		

	End Sub



</script>

		<form id="Form1" method="post" runat="server">

			<TABLE id="Table2" cellSpacing="0" cellPadding="0" 

width="300" border="0">

				<TR>

					<TD align="right" 

valign="top"><IMG src="../images/username.gif"></TD>

					<TD align="left" valign="top">

						<asp:TextBox id="Login" 

runat="server"></asp:TextBox></TD>

				</TR>

				<TR>

					<TD align="right" 

valign="top"><IMG src="../images/password.gif"></TD>

					<TD align="left" valign="top">

						<asp:TextBox id="Password" 

runat="server" TextMode="Password"></asp:TextBox></TD>

				</TR>

				<TR>

					<TD align="center" valign="top" 

colspan="2"><asp:ImageButton id="ImageButton1"  onClick="LoginBtn_Click" 

runat="server" ImageUrl="/images/logon.gif"></asp:ImageButton></TD>

				</TR>

			</TABLE>

		</form>

<ASP:DataGrid id="MyDataGrid" runat="server" />



Any help would be greatly appreciated.  Thanks.



			
Message #2 by "McCloy, Russell" <Russell.McCloy@B...> on Wed, 6 Mar 2002 09:14:45 +1100
Hugh,



This may be a silly question but what is the semi-colon(;) in your SQL

string?





RuSs



-----Original Message-----

From: Hugh McLaughlin [mailto:hugh@k...]

Sent: Wednesday, 6 March 2002 9:02 AM

To: aspx_beginners

Subject: [aspx_beginners] Stuck with a Class Problem





Hello Everyone and thanks for your help in advance.  I am developing a 

form the takes in a user's login name and password and then validates it 

against a SQL Server database.  At the present time, the code should 

simply spit back the record that was found.  But for some reason, it 

appears that I am not getting the parameter passed correctly to the class 

and function.  I am receivng the following error:



Compiler Error Message: BC30455: Argument not specified for 

parameter 'strLogin' of 'Public Function ValidateLogin(strLogin As String, 

strPassword As String) As Object'.



The code for the page is listed below:



<%@ Import Namespace="System.Data" %>

<%@ Import Namespace="System.Data.SqlClient" %>

<script language="vb" runat="server">



'Namespace KidsPortal



	Public Class PortalSecurity



		Public Function ValidateLogin(ByVal strLogin As String, 

ByVal strPassword As String)



			Dim myConnection As New SqlConnection

(ConfigurationSettings.AppSettings("connectionString"))



			Dim SQL As String = "SELECT * from tblUser WHERE 

szUserName = " & "'" & strLogin & "'" & "AND szPassword = " & "'" & 

strPassword & "';"



      			Dim myCommand As New SQLDataAdapter

(SQL,myConnection)



			Dim myDataset AS New DataSet



			myCommand.Fill(myDataSet)



			Return myDataset



		End Function



	End Class



'End Namespace







	Sub LoginBtn_Click(Sender As Object, E As ImageClickEventArgs)



		Dim AccountSystem As New PortalSecurity()

		AccountSystem.ValidateLogin(Login.Text, Password.Text)

		Dim myRecordSet As New PortalSecurity()



		myDatagrid.DataSource=myRecordSet.ValidateLogin



		Page.Databind()

		

	End Sub



</script>

		<form id="Form1" method="post" runat="server">

			<TABLE id="Table2" cellSpacing="0" cellPadding="0" 

width="300" border="0">

				<TR>

					<TD align="right" 

valign="top"><IMG src="../images/username.gif"></TD>

					<TD align="left" valign="top">

						<asp:TextBox id="Login" 

runat="server"></asp:TextBox></TD>

				</TR>

				<TR>

					<TD align="right" 

valign="top"><IMG src="../images/password.gif"></TD>

					<TD align="left" valign="top">

						<asp:TextBox id="Password" 

runat="server" TextMode="Password"></asp:TextBox></TD>

				</TR>

				<TR>

					<TD align="center" valign="top" 

colspan="2"><asp:ImageButton id="ImageButton1"  onClick="LoginBtn_Click" 

runat="server" ImageUrl="/images/logon.gif"></asp:ImageButton></TD>

				</TR>

			</TABLE>

		</form>

<ASP:DataGrid id="MyDataGrid" runat="server" />



Any help would be greatly appreciated.  Thanks.



			




$subst('Email.Unsub').

Message #3 by bchaudhary@s... on Tue, 5 Mar 2002 22:47:38
you're not putting a space after the apostrophe concatenation.



dim sql as string 



"SELECT * from tblUser WHERE 

szUserName = " & "'" & strLogin & "'" & "AND szPassword = " & "'" & 

strPassword & "';"



do this instead



"SELECT * from tblUser WHERE szUserName ='" & strLogin & "' AND szPassword 

= '" & strPassword & "';"



hey, and just fyi, the more you concatenate the more you slow down yr 

program.



> Hello Everyone and thanks for your help in advance.  I am developing a 

> form the takes in a user's login name and password and then validates it 

> against a SQL Server database.  At the present time, the code should 

> simply spit back the record that was found.  But for some reason, it 

> appears that I am not getting the parameter passed correctly to the 

class 

> and function.  I am receivng the following error:

> 

> Compiler Error Message: BC30455: Argument not specified for 

> parameter 'strLogin' of 'Public Function ValidateLogin(strLogin As 

String, 

> strPassword As String) As Object'.

> 

> The code for the page is listed below:

> 

> <%@ Import Namespace="System.Data" %>

> <%@ Import Namespace="System.Data.SqlClient" %>

> <script language="vb" runat="server">

> 

> 'Namespace KidsPortal

> 

> 	Public Class PortalSecurity

> 

> 		Public Function ValidateLogin(ByVal strLogin As String, 

> ByVal strPassword As String)

> 

> 			Dim myConnection As New SqlConnection

> (ConfigurationSettings.AppSettings("connectionString"))

> 

> 			Dim SQL As String = "SELECT * from tblUser WHERE 

> szUserName = " & "'" & strLogin & "'" & "AND szPassword = " & "'" & 

> strPassword & "';"

> 

>       			Dim myCommand As New SQLDataAdapter

> (SQL,myConnection)

> 

> 			Dim myDataset AS New DataSet

> 

> 			myCommand.Fill(myDataSet)

> 

> 			Return myDataset

> 

> 		End Function

> 

> 	End Class

> 

> 'End Namespace

> 

> 

> 

> 	Sub LoginBtn_Click(Sender As Object, E As ImageClickEventArgs)

> 

> 		Dim AccountSystem As New PortalSecurity()

> 		AccountSystem.ValidateLogin(Login.Text, Password.Text)

> 		Dim myRecordSet As New PortalSecurity()

> 

> 		myDatagrid.DataSource=myRecordSet.ValidateLogin

> 

> 		Page.Databind()

> 		

> 	End Sub

> 

> </script>

> 		<form id="Form1" method="post" runat="server">

> 			<TABLE id="Table2" cellSpacing="0" cellPadding="0" 

> width="300" border="0">

> 				<TR>

> 					<TD align="right" 

> valign="top"><IMG src="../images/username.gif"></TD>

> 					<TD align="left" valign="top">

> 						<asp:TextBox id="Login" 

> runat="server"></asp:TextBox></TD>

> 				</TR>

> 				<TR>

> 					<TD align="right" 

> valign="top"><IMG src="../images/password.gif"></TD>

> 					<TD align="left" valign="top">

> 						<asp:TextBox id="Password" 

> runat="server" TextMode="Password"></asp:TextBox></TD>

> 				</TR>

> 				<TR>

> 					<TD align="center" valign="top" 

> colspan="2"><asp:ImageButton id="ImageButton1"  onClick="LoginBtn_Click" 

> runat="server" ImageUrl="/images/logon.gif"></asp:ImageButton></TD>

> 				</TR>

> 			</TABLE>

> 		</form>

> <ASP:DataGrid id="MyDataGrid" runat="server" />

> 

> Any help would be greatly appreciated.  Thanks.

> 

> 			
Message #4 by "Denis Gobo" <dgobo@w...> on Tue, 5 Mar 2002 17:52:40 -0500
You did not supply a value for strLogin  in Public Function

ValidateLogin(strLogin As String,

strPassword As String) As Object





-----Original Message-----

From: Hugh McLaughlin [mailto:hugh@k...]

Sent: Tuesday, March 05, 2002 5:02 PM

To: aspx_beginners

Subject: [aspx_beginners] Stuck with a Class Problem





Hello Everyone and thanks for your help in advance.  I am developing a

form the takes in a user's login name and password and then validates it



against a SQL Server database.  At the present time, the code should

simply spit back the record that was found.  But for some reason, it

appears that I am not getting the parameter passed correctly to the

class

and function.  I am receivng the following error:



Compiler Error Message: BC30455: Argument not specified for

parameter 'strLogin' of 'Public Function ValidateLogin(strLogin As

String,

strPassword As String) As Object'.



The code for the page is listed below:



<%@ Import Namespace=3D"System.Data" %>

<%@ Import Namespace=3D"System.Data.SqlClient" %>

<script language=3D"vb" runat=3D"server">



'Namespace KidsPortal



	Public Class PortalSecurity



		Public Function ValidateLogin(ByVal strLogin As String,

ByVal strPassword As String)



			Dim myConnection As New SqlConnection

(ConfigurationSettings.AppSettings("connectionString"))



			Dim SQL As String =3D "SELECT * from tblUser WHERE



szUserName =3D " & "'" & strLogin & "'" & "AND szPassword =3D " & "'" &

strPassword & "';"



      			Dim myCommand As New SQLDataAdapter

(SQL,myConnection)



			Dim myDataset AS New DataSet



			myCommand.Fill(myDataSet)



			Return myDataset



		End Function



	End Class



'End Namespace







	Sub LoginBtn_Click(Sender As Object, E As ImageClickEventArgs)



		Dim AccountSystem As New PortalSecurity()

		AccountSystem.ValidateLogin(Login.Text, Password.Text)

		Dim myRecordSet As New PortalSecurity()



		myDatagrid.DataSource=3DmyRecordSet.ValidateLogin



		Page.Databind()

	=09

	End Sub



</script>

		<form id=3D"Form1" method=3D"post" runat=3D"server">

			<TABLE id=3D"Table2" cellSpacing=3D"0"

cellPadding=3D"0"

width=3D"300" border=3D"0">

				<TR>

					<TD align=3D"right"

valign=3D"top"><IMG src=3D"../images/username.gif"></TD>

					<TD align=3D"left" valign=3D"top">

						<asp:TextBox id=3D"Login"

runat=3D"server"></asp:TextBox></TD>

				</TR>

				<TR>

					<TD align=3D"right"

valign=3D"top"><IMG src=3D"../images/password.gif"></TD>

					<TD align=3D"left" valign=3D"top">

						<asp:TextBox

id=3D"Password"

runat=3D"server" TextMode=3D"Password"></asp:TextBox></TD>

				</TR>

				<TR>

					<TD align=3D"center" valign=3D"top"

colspan=3D"2"><asp:ImageButton id=3D"ImageButton1"  

onClick=3D"LoginBtn_Click"



runat=3D"server" ImageUrl=3D"/images/logon.gif"></asp:ImageButton></TD>

				</TR>

			</TABLE>

		</form>

<ASP:DataGrid id=3D"MyDataGrid" runat=3D"server" />



Any help would be greatly appreciated.  Thanks.



		=09




$subst('Email.Unsub').

Message #5 by "Hugh McLaughlin" <hugh@k...> on Tue, 5 Mar 2002 23:19:07
I thought the line:



AccountSystem.ValidateLogin(Login.Text, Password.Text)



Took care of that.



> You did not supply a value for strLogin  in Public Function

> ValidateLogin(strLogin As String,

> strPassword As String) As Object

> 

> 

> -----Original Message-----

> From: Hugh McLaughlin [mailto:hugh@k...]

> Sent: Tuesday, March 05, 2002 5:02 PM

> To: aspx_beginners

> Subject: [aspx_beginners] Stuck with a Class Problem

> 

> 

> Hello Everyone and thanks for your help in advance.  I am developing a

> form the takes in a user's login name and password and then validates it

> 

> against a SQL Server database.  At the present time, the code should

> simply spit back the record that was found.  But for some reason, it

> appears that I am not getting the parameter passed correctly to the

> class

> and function.  I am receivng the following error:

> 

> Compiler Error Message: BC30455: Argument not specified for

> parameter 'strLogin' of 'Public Function ValidateLogin(strLogin As

> String,

> strPassword As String) As Object'.

> 

> The code for the page is listed below:

> 

> <%@ Import Namespace=3D"System.Data" %>

> <%@ Import Namespace=3D"System.Data.SqlClient" %>

> <script language=3D"vb" runat=3D"server">

> 

> 'Namespace KidsPortal

> 

> 	Public Class PortalSecurity

> 

> 		Public Function ValidateLogin(ByVal strLogin As String,

> ByVal strPassword As String)

> 

> 			Dim myConnection As New SqlConnection

> (ConfigurationSettings.AppSettings("connectionString"))

> 

> 			Dim SQL As String =3D "SELECT * from tblUser WHERE

> 

> szUserName =3D " & "'" & strLogin & "'" & "AND szPassword =3D " & "'" 

&

> strPassword & "';"

> 

>       			Dim myCommand As New SQLDataAdapter

> (SQL,myConnection)

> 

> 			Dim myDataset AS New DataSet

> 

> 			myCommand.Fill(myDataSet)

> 

> 			Return myDataset

> 

> 		End Function

> 

> 	End Class

> 

> 'End Namespace

> 

> 

> 

> 	Sub LoginBtn_Click(Sender As Object, E As ImageClickEventArgs)

> 

> 		Dim AccountSystem As New PortalSecurity()

> 		AccountSystem.ValidateLogin(Login.Text, Password.Text)

> 		Dim myRecordSet As New PortalSecurity()

> 

> 		myDatagrid.DataSource=3DmyRecordSet.ValidateLogin

> 

> 		Page.Databind()

> 	=09

> 	End Sub

> 

> </script>

> 		<form id=3D"Form1" method=3D"post" runat=3D"server">

> 			<TABLE id=3D"Table2" cellSpacing=3D"0"

> cellPadding=3D"0"

> width=3D"300" border=3D"0">

> 				<TR>

> 					<TD align=3D"right"

> valign=3D"top"><IMG src=3D"../images/username.gif"></TD>

> 					<TD align=3D"left" valign=3D"top">

> 						<asp:TextBox 

id=3D"Login"

> runat=3D"server"></asp:TextBox></TD>

> 				</TR>

> 				<TR>

> 					<TD align=3D"right"

> valign=3D"top"><IMG src=3D"../images/password.gif"></TD>

> 					<TD align=3D"left" valign=3D"top">

> 						<asp:TextBox

> id=3D"Password"

> runat=3D"server" TextMode=3D"Password"></asp:TextBox></TD>

> 				</TR>

> 				<TR>

> 					<TD align=3D"center" 

valign=3D"top"

> colspan=3D"2"><asp:ImageButton id=3D"ImageButton1"  

> onClick=3D"LoginBtn_Click"

> 

> runat=3D"server" ImageUrl=3D"/images/logon.gif"></asp:ImageButton></TD>

> 				</TR>

> 			</TABLE>

> 		</form>

> <ASP:DataGrid id=3D"MyDataGrid" runat=3D"server" />

> 

> Any help would be greatly appreciated.  Thanks.

> 

> 		=09




> $subst('Email.Unsub').

Message #6 by "Denis Gobo" <dgobo@w...> on Tue, 5 Mar 2002 18:31:27 -0500
What if Login.Text =3D ""  did you check this value before calling

ValidateLogin





-----Original Message-----

From: Hugh McLaughlin [mailto:hugh@k...]

Sent: Tuesday, March 05, 2002 6:19 PM

To: aspx_beginners

Subject: [aspx_beginners] RE: Stuck with a Class Problem





I thought the line:



AccountSystem.ValidateLogin(Login.Text, Password.Text)



Took care of that.



> You did not supply a value for strLogin  in Public Function

> ValidateLogin(strLogin As String,=3D20 strPassword As String) As 

Object

>

>

> -----Original Message-----

> From: Hugh McLaughlin [mailto:hugh@k...]=3D20

> Sent: Tuesday, March 05, 2002 5:02 PM

> To: aspx_beginners

> Subject: [aspx_beginners] Stuck with a Class Problem

>

>

> Hello Everyone and thanks for your help in advance.  I am developing

> a=3D20 form the takes in a user's login name and password and then

> validates it

>

> against a SQL Server database.  At the present time, the code

> should=3D20 simply spit back the record that was found.  But for some

> reason, it=3D20 appears that I am not getting the parameter passed

> correctly to the class=3D20 and function.  I am receivng the following 



> error:

>

> Compiler Error Message: BC30455: Argument not specified for=3D20

> parameter 'strLogin' of 'Public Function ValidateLogin(strLogin As

> String,=3D20 strPassword As String) As Object'.

>

> The code for the page is listed below:

>

> <%@ Import Namespace=3D3D"System.Data" %>

> <%@ Import Namespace=3D3D"System.Data.SqlClient" %>

> <script language=3D3D"vb" runat=3D3D"server">

>

> 'Namespace KidsPortal

>

> 	Public Class PortalSecurity

>

> 		Public Function ValidateLogin(ByVal strLogin As

String,=3D20 ByVal

> strPassword As String)

>

> 			Dim myConnection As New SqlConnection

> (ConfigurationSettings.AppSettings("connectionString"))

>

> 			Dim SQL As String =3D3D "SELECT * from tblUser

WHERE

>

> szUserName =3D3D " & "'" & strLogin & "'" & "AND szPassword =3D3D " & 

"'"

&=3D20

> strPassword & "';"

>

>       			Dim myCommand As New SQLDataAdapter

> (SQL,myConnection)

>

> 			Dim myDataset AS New DataSet

>

> 			myCommand.Fill(myDataSet)

>

> 			Return myDataset

>

> 		End Function

>

> 	End Class

>

> 'End Namespace

>

>

>

> 	Sub LoginBtn_Click(Sender As Object, E As ImageClickEventArgs)

>

> 		Dim AccountSystem As New PortalSecurity()

> 		AccountSystem.ValidateLogin(Login.Text, Password.Text)

> 		Dim myRecordSet As New PortalSecurity()

>

> 		myDatagrid.DataSource=3D3DmyRecordSet.ValidateLogin

>

> 		Page.Databind()

> 	=3D09

> 	End Sub

>

> </script>

> 		<form id=3D3D"Form1" method=3D3D"post" runat=3D3D"server">

> 			<TABLE id=3D3D"Table2" cellSpacing=3D3D"0"

cellPadding=3D3D"0"=3D20

> width=3D3D"300" border=3D3D"0">

> 				<TR>

> 					<TD align=3D3D"right"=3D20

> valign=3D3D"top"><IMG src=3D3D"../images/username.gif"></TD>

> 					<TD align=3D3D"left"

valign=3D3D"top">

> 						<asp:TextBox

id=3D3D"Login"=3D20

> runat=3D3D"server"></asp:TextBox></TD>

> 				</TR>

> 				<TR>

> 					<TD align=3D3D"right"=3D20

> valign=3D3D"top"><IMG src=3D3D"../images/password.gif"></TD>

> 					<TD align=3D3D"left"

valign=3D3D"top">

> 						<asp:TextBox

> id=3D3D"Password"=3D20

> runat=3D3D"server" TextMode=3D3D"Password"></asp:TextBox></TD>

> 				</TR>

> 				<TR>

> 					<TD align=3D3D"center"

valign=3D3D"top"=3D20

> colspan=3D3D"2"><asp:ImageButton id=3D3D"ImageButton1"  =3D

> onClick=3D3D"LoginBtn_Click"

>

> runat=3D3D"server"

ImageUrl=3D3D"/images/logon.gif"></asp:ImageButton></TD>

> 				</TR>

> 			</TABLE>

> 		</form>

> <ASP:DataGrid id=3D3D"MyDataGrid" runat=3D3D"server" />

>

> Any help would be greatly appreciated.  Thanks.

>

> 		=3D09

> ---

> Change your mail options at http://p2p.wrox.com/manager.asp or=3D20 to 



> unsubscribe send a blank email to

> $subst('Email.Unsub').






$subst('Email.Unsub').

Message #7 by "Hugh McLaughlin" <hugh@k...> on Wed, 6 Mar 2002 01:07:48
I am not familiar with how to use that, but I did assign the textbox 

values to a label and the values do get passed.  Also, I have verified 

that the SQL statement works.



> What if Login.Text =3D ""  did you check this value before calling

> ValidateLogin

> 

> 

> -----Original Message-----

> From: Hugh McLaughlin [mailto:hugh@k...]

> Sent: Tuesday, March 05, 2002 6:19 PM

> To: aspx_beginners

> Subject: [aspx_beginners] RE: Stuck with a Class Problem

> 

> 

> I thought the line:

> 

> AccountSystem.ValidateLogin(Login.Text, Password.Text)

> 

> Took care of that.

> 

> > You did not supply a value for strLogin  in Public Function

> > ValidateLogin(strLogin As String,=3D20 strPassword As String) As 

> Object

> >

> >

> > -----Original Message-----

> > From: Hugh McLaughlin [mailto:hugh@k...]=3D20

> > Sent: Tuesday, March 05, 2002 5:02 PM

> > To: aspx_beginners

> > Subject: [aspx_beginners] Stuck with a Class Problem

> >

> >

> > Hello Everyone and thanks for your help in advance.  I am developing

> > a=3D20 form the takes in a user's login name and password and then

> > validates it

> >

> > against a SQL Server database.  At the present time, the code

> > should=3D20 simply spit back the record that was found.  But for 

some

> > reason, it=3D20 appears that I am not getting the parameter passed

> > correctly to the class=3D20 and function.  I am receivng the following 



> 

> > error:

> >

> > Compiler Error Message: BC30455: Argument not specified for=3D20

> > parameter 'strLogin' of 'Public Function ValidateLogin(strLogin As

> > String,=3D20 strPassword As String) As Object'.

> >

> > The code for the page is listed below:

> >

> > <%@ Import Namespace=3D3D"System.Data" %>

> > <%@ Import Namespace=3D3D"System.Data.SqlClient" %>

> > <script language=3D3D"vb" runat=3D3D"server">

> >

> > 'Namespace KidsPortal

> >

> > 	Public Class PortalSecurity

> >

> > 		Public Function ValidateLogin(ByVal strLogin As

> String,=3D20 ByVal

> > strPassword As String)

> >

> > 			Dim myConnection As New SqlConnection

> > (ConfigurationSettings.AppSettings("connectionString"))

> >

> > 			Dim SQL As String =3D3D "SELECT * from tblUser

> WHERE

> >

> > szUserName =3D3D " & "'" & strLogin & "'" & "AND szPassword =3D3D " & 

> "'"

> &=3D20

> > strPassword & "';"

> >

> >       			Dim myCommand As New SQLDataAdapter

> > (SQL,myConnection)

> >

> > 			Dim myDataset AS New DataSet

> >

> > 			myCommand.Fill(myDataSet)

> >

> > 			Return myDataset

> >

> > 		End Function

> >

> > 	End Class

> >

> > 'End Namespace

> >

> >

> >

> > 	Sub LoginBtn_Click(Sender As Object, E As ImageClickEventArgs)

> >

> > 		Dim AccountSystem As New PortalSecurity()

> > 		AccountSystem.ValidateLogin(Login.Text, Password.Text)

> > 		Dim myRecordSet As New PortalSecurity()

> >

> > 		myDatagrid.DataSource=3D3DmyRecordSet.ValidateLogin

> >

> > 		Page.Databind()

> > 	=3D09

> > 	End Sub

> >

> > </script>

> > 		<form id=3D3D"Form1" method=3D3D"post" runat=3D3D"server">

> > 			<TABLE id=3D3D"Table2" cellSpacing=3D3D"0"

> cellPadding=3D3D"0"=3D20

> > width=3D3D"300" border=3D3D"0">

> > 				<TR>

> > 					<TD align=3D3D"right"=3D20

> > valign=3D3D"top"><IMG src=3D3D"../images/username.gif"></TD>

> > 					<TD align=3D3D"left"

> valign=3D3D"top">

> > 						<asp:TextBox

> id=3D3D"Login"=3D20

> > runat=3D3D"server"></asp:TextBox></TD>

> > 				</TR>

> > 				<TR>

> > 					<TD align=3D3D"right"=3D20

> > valign=3D3D"top"><IMG src=3D3D"../images/password.gif"></TD>

> > 					<TD align=3D3D"left"

> valign=3D3D"top">

> > 						<asp:TextBox

> > id=3D3D"Password"=3D20

> > runat=3D3D"server" TextMode=3D3D"Password"></asp:TextBox></TD>

> > 				</TR>

> > 				<TR>

> > 					<TD align=3D3D"center"

> valign=3D3D"top"=3D20

> > colspan=3D3D"2"><asp:ImageButton id=3D3D"ImageButton1"  =3D

> > onClick=3D3D"LoginBtn_Click"

> >

> > runat=3D3D"server"

> ImageUrl=3D3D"/images/logon.gif"></asp:ImageButton></TD>

> > 				</TR>

> > 			</TABLE>

> > 		</form>

> > <ASP:DataGrid id=3D3D"MyDataGrid" runat=3D3D"server" />

> >

> > Any help would be greatly appreciated.  Thanks.

> >

> > 		=3D09

> > ---

> > Change your mail options at http://p2p.wrox.com/manager.asp or=3D20 to 



> 

> > unsubscribe send a blank email to

> > $subst('Email.Unsub').

> 




> $subst('Email.Unsub').


  Return to Index