hi, I have 2 files aspx and ascx and compiler return erorr, please help me to resolve that problem
login.ascx
<%@ Control className="login" %>
<%@ Import Namespace="System.Web.Security " %>
<script language="C#" runat="server">
void Login_Click(object sender, EventArgs E)
{
// ?????????????? ????????????: ??? ????????
// ????????????? ??????
// ?????? ???????????? ? ?????? doug@programmingasp.net
// ? ??????? 'password1.
if ((UserEmail.Value == "doug@programmingasp.net") &&
(UserPass.Value == "password"))
{
// FormsAuthentication . RedirectFromLoginPageC
// UserEmail. Value, false);
Fo rmsAuthenticat ion. Get Redirect Url ( UserEmail.Value, false);
Msg.Text = "Logged In I" ;
}
else
{
Msg.Text = "Invalid Credentials: Please try again";
</script>
<table width=120 bgColor="red">
<tr>
<td>
<center>
<h3>
<font face="Verdana" color=Yellow>Login<font>
</h3>
<table width=100px>
<tr>
<td>
<font color=yellow>Email:</font>
</td>
</tr>
<tr>
<td>
<input id="Text1" ld="UserEmail"
type="text"
runat=server />
size=20
maxlen=30 />
</td>
<td>
<asp: RequiredFieldValidator
ControlToValidate="UserEmail"
Display="Static"
ErrorMessage="*"
runat="server" />
</td>
</tr>
<tr>
<td>
<font color=yellow>Password:</font>
</td>
</tr>
<tr>
<td>
<input id="UserPass"
type=password
runat=server
size=20
maxlen=30 />
</td>
<td>
<asp:RequiredFieldValidator
ControlToValidate="UserPass"
Display="Static"
ErrorHessage="*"
runat=server />
</td>
</tr>
<tr>
<td colspan=3 align="center">
<asp:button text="Login"
QnClick="Login_Click"
runat=server>
</asp:button>
<P>
<asp:Label id="Msg" ForeColor="Yellow"
Font-Name="Verdana"
Font-Size="10"
runat=server />
</td>
</tr>
</table>
and
UserLogin.aspx
<%@ Page LANGUAGE="C#" %>
<%@ Register TagPrefix="Chapter06" TagName="login" Src="Login.ascx" %>
<html>
<head>
<title>Use Login User Control</title>
</head>
<body leftrmargin="0" topmargin="0">
<form id="Form1" runat=server>
<table width=600 height=600 border=C
cellpadding=0 cellspacing=0>
<tr>
<td width=120 bgcolor="blue" valign=top>
<font face="verdana"
color="yellow" size=2xb>
Just before the user control is included...
</b></font>
<Chapter06:login
rD="LoginControl"
RunAt=Server />
<font face="verdana"
color="yellow" size=2xb>
Just after the us«r control was included...
</b></font>
</td>
<td valign=top>
<center>
<br>
<bxfont face="verdana" size=4>
This is the rest of the page!
</fontx/b>
</center>
</td>
</tr>
</table>
</form>
</body>
</html>
login.ascx
<%@ Control className="login" %>
<%@ Import Namespace="System.Web.Security " %>
<script language="C#" runat="server">
void Login_Click(object sender, EventArgs E)
{
// ?????????????? ????????????: ??? ????????
// ????????????? ??????
// ?????? ???????????? ? ?????? doug@programmingasp.net
// ? ??????? 'password1.
if ((UserEmail.Value == "doug@programmingasp.net") &&
(UserPass.Value == "password"))
{
// FormsAuthentication . RedirectFromLoginPageC
// UserEmail. Value, false);
Fo rmsAuthenticat ion. Get Redirect Url ( UserEmail.Value, false);
Msg.Text = "Logged In I" ;
}
else
{
Msg.Text = "Invalid Credentials: Please try again";
</script>
<table width=120 bgColor="red">
<tr>
<td>
<center>
<h3>
<font face="Verdana" color=Yellow>Login<font>
</h3>
<table width=100px>
<tr>
<td>
<font color=yellow>Email:</font>
</td>
</tr>
<tr>
<td>
<input id="Text1" ld="UserEmail"
type="text"
runat=server />
size=20
maxlen=30 />
</td>
<td>
<asp: RequiredFieldValidator
ControlToValidate="UserEmail"
Display="Static"
ErrorMessage="*"
runat="server" />
</td>
</tr>
<tr>
<td>
<font color=yellow>Password:</font>
</td>
</tr>
<tr>
<td>
<input id="UserPass"
type=password
runat=server
size=20
maxlen=30 />
</td>
<td>
<asp:RequiredFieldValidator
ControlToValidate="UserPass"
Display="Static"
ErrorHessage="*"
runat=server />
</td>
</tr>
<tr>
<td colspan=3 align="center">
<asp:button text="Login"
QnClick="Login_Click"
runat=server>
</asp:button>
<P>
<asp:Label id="Msg" ForeColor="Yellow"
Font-Name="Verdana"
Font-Size="10"
runat=server />
</td>
</tr>
</table>
and
UserLogin.aspx
<%@ Page LANGUAGE="C#" %>
<%@ Register TagPrefix="Chapter06" TagName="login" Src="Login.ascx" %>
<html>
<head>
<title>Use Login User Control</title>
</head>
<body leftrmargin="0" topmargin="0">
<form id="Form1" runat=server>
<table width=600 height=600 border=C
cellpadding=0 cellspacing=0>
<tr>
<td width=120 bgcolor="blue" valign=top>
<font face="verdana"
color="yellow" size=2xb>
Just before the user control is included...
</b></font>
<Chapter06:login
rD="LoginControl"
RunAt=Server />
<font face="verdana"
color="yellow" size=2xb>
Just after the us«r control was included...
</b></font>
</td>
<td valign=top>
<center>
<br>
<bxfont face="verdana" size=4>
This is the rest of the page!
</fontx/b>
</center>
</td>
</tr>
</table>
</form>
</body>
</html>