.NET NEWBIE - EASY QUESTION

Discussion in 'ASP .Net' started by =?Utf-8?B?UnlhbiBTbWl0aA==?=, Apr 9, 2004.

  1. I have been programming in ASP for years and am making the move to .NET and am having a problem. I have an item on a form that i am validating against and i am receiving the following error message. What am i doing wrong

    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: BC30456: 'LoginBtn_Click' is not a member of 'ASP.login_aspx'

    Source Error

    Line 58: </tbody
    Line 59: </table
    Line 60: <asp:button id="LoginBtn" onclick="LoginBtn_Click" runat="server" text="Login"></asp:button
    Line 61: <p
    Line 62: <asp:Label id="Msg" runat="server" forecolor="red"></asp:Label

    I had been advised that i was receiving this message because my code is not located in between the form tags and it is. The form is shown below

    <form runat="server"><h2>&nbsp
    </h2><h2>Login Page
    </h2><hr size="1" /><table><tbody><tr><td
    Username:</td><td><asp:TextBox id="UserName" runat="server"></asp:TextBox></td><td><asp:RequiredFieldValidator id="Requiredfieldvalidator1" runat="server" ErrorMessage="*" Display="Static" ControlToValidate="UserName"></asp:RequiredFieldValidator></td></tr><tr><td
    Password:</td><td><asp:TextBox id="UserPass" runat="server" TextMode="Password"></asp:TextBox></td><td><asp:RequiredFieldValidator id="Requiredfieldvalidator2" runat="server" ErrorMessage="*" Display="Static" ControlToValidate="UserPass"></asp:RequiredFieldValidator></td></tr></tbody></table><asp:button id="LoginBtn" onclick="LoginBtn_Click" runat="server" text="Login"></asp:button><p><asp:Label id="Msg" runat="server" forecolor="red"></asp:Label></p></form

    I am developing with Web Matrix if that helps. Thanks
    Ryan
     
    =?Utf-8?B?UnlhbiBTbWl0aA==?=, Apr 9, 2004
    #1
    1. Advertising

  2. =?Utf-8?B?UnlhbiBTbWl0aA==?=

    Sharon Guest

    you need to add a handler for this event:
    Private Sub LoginBtn_Click(ByVal sender As System.Object, ByVal e As
    System.EventArgs)

    End Sub


    "Ryan Smith" <> wrote in message
    news:...
    > I have been programming in ASP for years and am making the move to .NET

    and am having a problem. I have an item on a form that i am validating
    against and i am receiving the following error message. What am i doing
    wrong?
    >
    > Description: An error occurred during the compilation of a resource

    required to service this request. Please review the following specific error
    details and modify your source code appropriately.
    >
    > Compiler Error Message: BC30456: 'LoginBtn_Click' is not a member of

    'ASP.login_aspx'.
    >
    > Source Error:
    >
    > Line 58: </tbody>
    > Line 59: </table>
    > Line 60: <asp:button id="LoginBtn" onclick="LoginBtn_Click"

    runat="server" text="Login"></asp:button>
    > Line 61: <p>
    > Line 62: <asp:Label id="Msg" runat="server"

    forecolor="red"></asp:Label>
    >
    > I had been advised that i was receiving this message because my code is

    not located in between the form tags and it is. The form is shown below:
    >
    > <form runat="server"><h2>&nbsp;
    > </h2><h2>Login Page
    > </h2><hr size="1" /><table><tbody><tr><td>
    > Username:</td><td><asp:TextBox id="UserName"

    runat="server"></asp:TextBox></td><td><asp:RequiredFieldValidator
    id="Requiredfieldvalidator1" runat="server" ErrorMessage="*"
    Display="Static"
    ControlToValidate="UserName"></asp:RequiredFieldValidator></td></tr><tr><td>
    > Password:</td><td><asp:TextBox id="UserPass"

    runat="server"
    TextMode="Password"></asp:TextBox></td><td><asp:RequiredFieldValidator
    id="Requiredfieldvalidator2" runat="server" ErrorMessage="*"
    Display="Static"
    ControlToValidate="UserPass"></asp:RequiredFieldValidator></td></tr></tbody>
    </table><asp:button id="LoginBtn" onclick="LoginBtn_Click" runat="server"
    text="Login"></asp:button><p><asp:Label id="Msg" runat="server"
    forecolor="red"></asp:Label></p></form>
    >
    > I am developing with Web Matrix if that helps. Thanks!
    > Ryan
     
    Sharon, Apr 10, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hazzard
    Replies:
    2
    Views:
    669
    Hazzard
    Apr 6, 2004
  2. =?Utf-8?B?UnlhbiBTbWl0aA==?=

    .NET NEWBIE - EASY QUESTION

    =?Utf-8?B?UnlhbiBTbWl0aA==?=, Apr 7, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    443
    Matthew Sajdera
    Apr 7, 2004
  3. Roedy Green

    Re: easy newbie question

    Roedy Green, Nov 3, 2003, in forum: Java
    Replies:
    2
    Views:
    357
    Roedy Green
    Nov 5, 2003
  4. news.nucleus.com

    easy newbie question

    news.nucleus.com, Nov 3, 2003, in forum: Java
    Replies:
    1
    Views:
    331
    Phil Hanna
    Nov 8, 2003
  5. Bruno Desthuilliers
    Replies:
    5
    Views:
    405
    Bruno Desthuilliers
    Aug 29, 2007
Loading...

Share This Page