Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Error: 'LogIn' is not a member of 'ASP.account_login_aspx'.

Error: 'LogIn' is not a member of 'ASP.account_login_aspx'.

Error: 'LogIn' is not a member of 'ASP.account_login_aspx'.


What does it mean, please, when Visual Studio gives the following error:

Error 2'LogIn' is not a member of 'ASP.account_login_aspx'. C:\Users\Steve\Documents\Visual Studio 2013\WebSites\WebSite5copy131014\Account\Login.aspx 64

This is the code the error is referring to:


<%@ Page Title="Log in" Language="VB" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeFile="Login.aspx.vb" Inherits="Account_Login" Async="true" %>

<%@ Register Src="~/Account/OpenAuthProviders.ascx" TagPrefix="uc" TagName="OpenAuthProviders" %>

<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">

            background-color: #BD2CBB !important;

    <h2><%: Title %>.</h2>

    <div class="row">
        <div class="col-md-8">
            <section id="loginForm">
                <div class="form-horizontal">
                    <h4>Use a local account to log in.</h4>
                    <hr />
                    <asp:PlaceHolder runat="server" ID="ErrorMessage" Visible="false">
                        <p class="text-danger">
                            <asp:Literal runat="server" ID="FailureText" />
                    <div class="form-group">
                        <asp:Label runat="server" AssociatedControlID="UserName" CssClass="col-md-2 control-label">User name</asp:Label>
                        <div class="col-md-10">
                            <asp:TextBox runat="server" ID="username" CssClass="form-control" />
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="username"
                                CssClass="text-danger" ErrorMessage="The user name field is required." />
                    <div class="form-group">
                        <asp:Label ID="Label2" runat="server" AssociatedControlID="password" CssClass="col-md-2 control-label">Password</asp:Label>
                        <div class="col-md-10">
                            <asp:TextBox runat="server" ID="password" TextMode="password" CssClass="form-control" />
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="password" CssClass="text-danger" ErrorMessage="The password field is required." />
                    <div class="form-group">
                        <div class="col-md-offset-2 col-md-10">
                            <div class="checkbox">
                                <asp:CheckBox runat="server" ID="RememberMe" />
                                <asp:Label ID="Label3" runat="server" AssociatedControlID="RememberMe">Remember me?</asp:Label>
                    <div class="form-group">
                        <div class="col-md-offset-2 col-md-10">
                            <asp:Button ID=btnLogin runat="server" OnClick="Login" Text="Log in" CssClass="btn btn-default" />
                    <asp:HyperLink runat="server" ID="RegisterHyperLink" ViewStateMode="Disabled">Register</asp:HyperLink>
                    if you don't have a local account.

        <div class="col-md-4">
            <section id="socialLoginForm">
                <uc:openauthproviders runat="server" id="OpenAuthLogin" />

I can't even see the error for LogIn (with a capital I) or have a file called 'ASP.account_login_aspx'. How can I best resolve this, please?


RE: Error: 'LogIn' is not a member of 'ASP.account_login_aspx'.

check your code file



Maybe in it you are referring to something named "LogIn"

RE: Error: 'LogIn' is not a member of 'ASP.account_login_aspx'.

Hello jbenson

Thank you for our reply.

In my aspx file (the Log in form), I have:


<%@ Page Title="Log in" Language="VB" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeFile="Login.aspx.vb" Inherits="LoginPage" Async="true" %>] 

and in the aspx.vb file itself, I have:


Imports Microsoft.AspNet.Identity
Imports Microsoft.AspNet.Identity.EntityFramework
Imports Microsoft.AspNet.Identity.Owin
Imports System.Linq
Imports System.Web
Imports System.Web.UI
Imports Microsoft.Owin.Security
Imports System
Imports System.Data
Imports System.Configuration
Imports System.Web.Security
Imports System.Web.UI.WebControls
Imports System.Web.UI.WebControls.WebParts
Imports System.Web.UI.HtmlControls
Imports System.Data.OleDb

Partial Public Class LoginPage
    Inherits Page

    Dim NewWindow As Object

    Protected Sub Page_Load(ByVal sender As Object, e As EventArgs) Handles Me.Load
        RegisterHyperLink.NavigateUrl = "Register"
        OpenAuthLogin.ReturnUrl = Request.QueryString("ReturnUrl")
        Dim returnUrl = HttpUtility.UrlEncode(Request.QueryString("ReturnUrl"))
        If Not [String].IsNullOrEmpty(returnUrl) Then
            RegisterHyperLink.NavigateUrl += "?ReturnUrl=" & returnUrl
        End If
    End Sub

    Protected Sub btnLogin_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        AddHandler btnLogin
        Dim connect = "Provider=Microsoft.Jet.OleDb.4.0; Data Source=|DataDirectory|students.mdb;"

        Dim query As String
        query = "Select Count(*) From university Where username = ? AND [password] = ?"
        Dim result As Integer = 0
        Using conn As New OleDbConnection(connect)
            Using cmd As New OleDbCommand(query, conn)
                cmd.Parameters.AddWithValue("", username.Text)
                cmd.Parameters.AddWithValue("", password.Text)
                Session("User") = username.Text
                result = DirectCast(cmd.ExecuteScalar(), Integer)
            End Using
        End Using
        If result > 0 Then
            FailureText.Text = "Invalid credentials"
        End If
    End Sub
End Class 

The error is here: AddHandler btnLogin

I am hoping that once the form can validate the user that the user will be redirected to 'upload.asp'?

Many thanks again.

RE: Error: 'LogIn' is not a member of 'ASP.account_login_aspx'.


AddHandler btnLogin 
is incorrect syntax
You need need to add a handles clause to your btnLogin_Click event instead


Protected Sub btnLogin_Click(ByVal sender As Object, ByVal e As System.EventArgs) handles btnLogin.Click 

RE: Error: 'LogIn' is not a member of 'ASP.account_login_aspx'.

Thank you, jbenson001.

Your code removed that


AddHandler btnLogin 
code error that I was getting.

I am getting this error: 'Login' is not a member of 'ASP.login_aspx'. This refers to my Login.aspx file. I have done a 'Entire Solution' Edit | Find and get no results for 'ASP.login_aspx', so I can only assume it is a 'false' error.

Many thanks again for your reply and my apologies for the delay in getting back to you.


RE: Error: 'LogIn' is not a member of 'ASP.account_login_aspx'.

Without seeing your entire project, it's hard to say. At this point I would say to start a new project from scratch and move your code from this one into it as necessary

RE: Error: 'LogIn' is not a member of 'ASP.account_login_aspx'.

I have just this minute managed to identify the error. It had nothing to do with what VS was telling me, but was related to this line:

CODE -->

<asp:Button ID=btnLogin runat="server" OnClick="btnLogin_Click" Text="Log in" CssClass="btn btn-default" /> 

This seems to be what it should be and not

CODE -->

which is the way I had it.

Thanks again.


RE: Error: 'LogIn' is not a member of 'ASP.account_login_aspx'.

Great, glad you found it!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close