I am making a Login Page with ASP.Net using C#... and i have put my html code in Login.aspx page . that contains a textbox named username but when I give reference of my textbox in Login.aspx.cs to make the validations on this text box ... as
if(string.IsNullOrEmpty(username.Text))
{
...
...
}
i am getting an error that is saying ...-"The 'username' doesn't exist in the current context"
......
how can i get rid of this error .... it is making me mas .... Help will be appreciable towards this error ... please help me ....
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"> </asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">