J
Jozef
Hello,
I'm doing the lessons out of a Sams ASP.net book and have copied the
following verbatim, out of the book (without the beginning and ending
quotes);
"'<%@ Page Language="vb"%>
<%@register TagPrefix="TYASPNET" TagName=LoginForm src=LoginForm.ascx%>
<script runat=server>
Sub Page_Load(obj as object,e as eventargs)
lblMessage.Text = "Properties of the user " & _
"control:<br> " & _
"id: " & LoginForm1.id & "<br>" & _
"BackColor: " & LoginForm1.Backcolor & "<br>" & _
"Username: " & LoginForm1.Username & "<br>" & _
"Password: " & LoginForm1.Password
End Sub"
The lblMessage control is part of the LoginForm user control.
I've reviewed the code in the book and can't figure out what's wrong.
I'll cut and paste both pages of code in their entirety below.
Thanks!
Jo
"<script language=vb runat=server>
Public Backcolor as string="white"
public UserName as string
Public Password as string
LoginForm.ascx = the following;
"Public Sub Submit(obj as object, e as eventargs)
lblMessage.Text="Username: <b>" & User.Text & _
"</b><br>" & "Password: <b>" & Pass.Text & "</b><p>"
End Sub
</script>
<table style="background-color:<%=backcolor%>;
font: 10pt verdana;border-width:1;
border-style:solid;border-color:black;"
cellspacing=15>
<tr>
<td><b>Login: </b></td>
<td><asp:Textbox id=user runat=server /></td>
</tr>
<tr>
<td><b>Password:</b></td>
<td><asp:textbox id=Pass TextMode=Password runat=server /></td>
</tr>
<tr><td></td>
<td><asp:button text=Submit runat=server OnClick=Submit /></td>
</tr>
</table>
<p>
<asp:Label id=lblMessage runat=server /></p>"
LoginMaster.aspx = the following
<%@ Page Language="vb"%>
<%@register TagPrefix="TYASPNET" TagName=LoginForm src=LoginForm.ascx%>
<script runat=server>
Sub Page_Load(obj as object,e as eventargs)
lblMessage.Text = "Properties of the user " & _
"control:<br> " & _
"id: " & LoginForm1.id & "<br>" & _
"BackColor: " & LoginForm1.Backcolor & "<br>" & _
"Username: " & LoginForm1.Username & "<br>" & _
"Password: " & LoginForm1.Password
End Sub
</script>
<html>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<tyaspnet:LoginForm id=LoginForm1 runat=server
password=MyPassword
UserName=Chris
BackColor=Beige/>
</form>
</body>
</html>
I'm doing the lessons out of a Sams ASP.net book and have copied the
following verbatim, out of the book (without the beginning and ending
quotes);
"'<%@ Page Language="vb"%>
<%@register TagPrefix="TYASPNET" TagName=LoginForm src=LoginForm.ascx%>
<script runat=server>
Sub Page_Load(obj as object,e as eventargs)
lblMessage.Text = "Properties of the user " & _
"control:<br> " & _
"id: " & LoginForm1.id & "<br>" & _
"BackColor: " & LoginForm1.Backcolor & "<br>" & _
"Username: " & LoginForm1.Username & "<br>" & _
"Password: " & LoginForm1.Password
End Sub"
The lblMessage control is part of the LoginForm user control.
I've reviewed the code in the book and can't figure out what's wrong.
I'll cut and paste both pages of code in their entirety below.
Thanks!
Jo
"<script language=vb runat=server>
Public Backcolor as string="white"
public UserName as string
Public Password as string
LoginForm.ascx = the following;
"Public Sub Submit(obj as object, e as eventargs)
lblMessage.Text="Username: <b>" & User.Text & _
"</b><br>" & "Password: <b>" & Pass.Text & "</b><p>"
End Sub
</script>
<table style="background-color:<%=backcolor%>;
font: 10pt verdana;border-width:1;
border-style:solid;border-color:black;"
cellspacing=15>
<tr>
<td><b>Login: </b></td>
<td><asp:Textbox id=user runat=server /></td>
</tr>
<tr>
<td><b>Password:</b></td>
<td><asp:textbox id=Pass TextMode=Password runat=server /></td>
</tr>
<tr><td></td>
<td><asp:button text=Submit runat=server OnClick=Submit /></td>
</tr>
</table>
<p>
<asp:Label id=lblMessage runat=server /></p>"
LoginMaster.aspx = the following
<%@ Page Language="vb"%>
<%@register TagPrefix="TYASPNET" TagName=LoginForm src=LoginForm.ascx%>
<script runat=server>
Sub Page_Load(obj as object,e as eventargs)
lblMessage.Text = "Properties of the user " & _
"control:<br> " & _
"id: " & LoginForm1.id & "<br>" & _
"BackColor: " & LoginForm1.Backcolor & "<br>" & _
"Username: " & LoginForm1.Username & "<br>" & _
"Password: " & LoginForm1.Password
End Sub
</script>
<html>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<tyaspnet:LoginForm id=LoginForm1 runat=server
password=MyPassword
UserName=Chris
BackColor=Beige/>
</form>
</body>
</html>