Click here to Skip to main content
15,665,942 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
There is an error in this code as btnlogin click is not member of ASP.home.aspx

What I have tried:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Home.aspx.cs" Inherits="Home" %>



<table><tbody><tr><td colspan="3" style="text-align: center"><span style="font-size: 16pt; color: rgba(0, 0, 204, 1)">Chat Application Login Area</span>
</td></tr><tr><td style="width: 100px; text-align: right">
Name : 
</td><td style="width: 100px"><asp:textbox id="txtname" runat="server"></td><td style="width: 100px"></td></tr><tr><td style="width: 100px"></td><td style="width: 100px"><asp:button id="btnlogin" runat="server" onclick="btnlogin_Click" text="Login"></td><td style="width: 100px"></td></tr></tbody></table>

Updated 8-Apr-22 8:38am

1 solution

We can't tell - you need to look at it on combination with you C# code in the Home.aspx.cs file that we can't see.
Chances are this its' a simple miss-spelling: is the handler method really called btnlogin_Click or is it btnLogin_Click or BtnLogin_Click? Remember, C# is case sensitive, so the three names are not equivelant!
Share this answer
114_nidhi Parikh 8-Apr-22 14:46pm    
Error is still the same
Dave Kreskowiak 8-Apr-22 18:20pm    
That's because the problem is in the code you haven't posted. That would be the C# code behind this page...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900