Re: Webform in book won't work live, what's up?
- From: "Juan T. Llibre" <nomailreplies@xxxxxxxxxxx>
- Date: Wed, 1 Jun 2005 09:29:13 -0400
The complete example is posted at :
http://asp1.ccac.edu/cit235/ew00/webdb/s2003/week4/userctrl.html
Check your code against that source code
and see if there's anything you missed.
Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================
"Jozef" <NOSPAM@xxxxxxxxxx> wrote in message news:5tine.1534181$8l.393161@xxxxxxxxxxx
> Woops! Sorry, thanks for pointing that out. Here is the error;
> Compiler Error Message: BC30451: Name 'lblMessage' is not declared.
>
> Source Error:
>
>
> Line 3: <script runat=server>
> Line 4: Sub Page_Load(obj as object,e as eventargs)
> Line 5: lblMessage.Text = "Properties of the user " & _
> Line 6: "control:<br> " & _
> Line 7: "id: " & LoginForm1.id & "<br>" & _
>
>
> Jo
> "Terry Burns" <here@xxxxxxx> wrote in message
> news:OTf8eJnZFHA.2916@xxxxxxxxxxxxxxxxxxxxxxx
>> You didnt say what problem you had, just that it did not work.
>>
>> --
>> Terry Burns
>> http://TrainingOn.net
>>
>>
>> "Jozef" <NOSPAM@xxxxxxxxxx> wrote in message news:qvane.1531473$8l.1364647@xxxxxxxxxxx
>>> 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>
>>>
>>>
>>
>>
>
>
.
- References:
- Webform in book won't work live, what's up?
- From: Jozef
- Re: Webform in book won't work live, what's up?
- From: Terry Burns
- Re: Webform in book won't work live, what's up?
- From: Jozef
- Webform in book won't work live, what's up?
- Prev by Date: Re: File Download from Network Share
- Next by Date: Re: Uploading a Photograph
- Previous by thread: Re: Webform in book won't work live, what's up?
- Next by thread: Re: Webform in book won't work live, what's up?
- Index(es):