Hey all;
can someone tell me what the problem is here?
<%@ Page Language="C#" %>
<%@ Register TagPrefix="KUTI" TagName="Login" Src="Login.ascx" %>
<script runat="server">
public abstract class Login : System.Web.UI.UserControl
{
public string WebSite
{
get {return Convert.ToString(ViewState["SiteAdi"]);}
set {ViewState["WebSite"] = value;}
}
private void Button1_Click(object sender, System.EventArgs e)
{
if( this.username.Text != "kuti" || this.password.Text != "kuti"
{
this.Label1.Text = "ERRor";
} else{
this.UserName = username.Text;
this.Label1.Text = "Hello" + this.username.Text + ". " + this.WebSite + " welcome .";
}
}
}
void Login1_Load(object sender, EventArgs e) {
}
</script>
<html>
<head>
</head>
<body>
<form runat="server">
<!-- Insert content here -->
<KUTI:Login id="Login1" OnLoad="Login1_Load" Runat="Server" WebSite="blahblah.net"></KUTI:Login>
</form>
</body>
</html>
login.ascx
==========
<%@ Control Language="C#" %>
<div id="maxilogin" align="center">User Name :
<asp:TextBox id="username" Runat="server"></asp:TextBox>
Password :
<asp:TextBox id="password" Runat="server"></asp:TextBox>
<asp:Button id="login" Runat="server" Text="GIR"></asp:Button>
<br />
<asp:Label id="result" runat="server"></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 != "kuti" || this.password.Text != "kuti"
Line 17: {
Line 18: this.Label1.Text = "ERRor";
can someone tell me what the problem is here?
<%@ Page Language="C#" %>
<%@ Register TagPrefix="KUTI" TagName="Login" Src="Login.ascx" %>
<script runat="server">
public abstract class Login : System.Web.UI.UserControl
{
public string WebSite
{
get {return Convert.ToString(ViewState["SiteAdi"]);}
set {ViewState["WebSite"] = value;}
}
private void Button1_Click(object sender, System.EventArgs e)
{
if( this.username.Text != "kuti" || this.password.Text != "kuti"
{
this.Label1.Text = "ERRor";
} else{
this.UserName = username.Text;
this.Label1.Text = "Hello" + this.username.Text + ". " + this.WebSite + " welcome .";
}
}
}
void Login1_Load(object sender, EventArgs e) {
}
</script>
<html>
<head>
</head>
<body>
<form runat="server">
<!-- Insert content here -->
<KUTI:Login id="Login1" OnLoad="Login1_Load" Runat="Server" WebSite="blahblah.net"></KUTI:Login>
</form>
</body>
</html>
login.ascx
==========
<%@ Control Language="C#" %>
<div id="maxilogin" align="center">User Name :
<asp:TextBox id="username" Runat="server"></asp:TextBox>
Password :
<asp:TextBox id="password" Runat="server"></asp:TextBox>
<asp:Button id="login" Runat="server" Text="GIR"></asp:Button>
<br />
<asp:Label id="result" runat="server"></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 != "kuti" || this.password.Text != "kuti"
Line 17: {
Line 18: this.Label1.Text = "ERRor";