Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hey all; can someone tell me wha

Status
Not open for further replies.

Fatih235

MIS
May 30, 2002
19
0
0
US
Hey all;

can someone tell me what the problem is here?

<%@ Page Language=&quot;C#&quot; %>
<%@ Register TagPrefix=&quot;KUTI&quot; TagName=&quot;Login&quot; Src=&quot;Login.ascx&quot; %>
<script runat=&quot;server&quot;>

public abstract class Login : System.Web.UI.UserControl
{

public string WebSite
{
get {return Convert.ToString(ViewState[&quot;SiteAdi&quot;]);}
set {ViewState[&quot;WebSite&quot;] = value;}
}

private void Button1_Click(object sender, System.EventArgs e)
{
if( this.username.Text != &quot;kuti&quot; || this.password.Text != &quot;kuti&quot;)
{
this.Label1.Text = &quot;ERRor&quot;;
} else{
this.UserName = username.Text;
this.Label1.Text = &quot;Hello&quot; + this.username.Text + &quot;. &quot; + this.WebSite + &quot; welcome .&quot;;
}
}

}



void Login1_Load(object sender, EventArgs e) {

}

</script>
<html>
<head>
</head>
<body>
<form runat=&quot;server&quot;>
<!-- Insert content here -->
<KUTI:Login id=&quot;Login1&quot; OnLoad=&quot;Login1_Load&quot; Runat=&quot;Server&quot; WebSite=&quot;blahblah.net&quot;></KUTI:Login>
</form>
</body>
</html>



login.ascx
==========

<%@ Control Language=&quot;C#&quot; %>
<div id=&quot;maxilogin&quot; align=&quot;center&quot;>User Name :
<asp:TextBox id=&quot;username&quot; Runat=&quot;server&quot;></asp:TextBox>
Password :
<asp:TextBox id=&quot;password&quot; Runat=&quot;server&quot;></asp:TextBox>
<asp:Button id=&quot;login&quot; Runat=&quot;server&quot; Text=&quot;GIR&quot;></asp:Button>
<br />
<asp:Label id=&quot;result&quot; runat=&quot;server&quot;></asp:Label>
</div>




I am getting this error;




Line 14: private void Button1_Click(object sender, System.EventArgs e)
Line 15: {
Line 16: if( this.username.Text != &quot;kuti&quot; || this.password.Text != &quot;kuti&quot;)
Line 17: {
Line 18: this.Label1.Text = &quot;ERRor&quot;;


 
the erro says &quot;Compiler Error Message: CS0117: 'ASP.Login_aspx.Login' does not contain a definition for 'username'&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top