[Mono-list] Compilation errors
Azher Amin
azher at niit.edu.pk
Sat Aug 25 00:03:04 EDT 2007
Hi,
I am getting this error while compiling the below code. I would be
grateful if someone suggest on how to resolve the problem.
Error:
Login.aspx.cs(17,9): error CS0117: `System.Web.UI.Page' does not contain
a definition for `SetFocus'
Login.aspx.cs(22,9): error CS0246: The type or namespace name
`MembershipUser' could not be found. Are you missing a using directive
or an assembly reference?
Compilation failed: 2 error(s), 0 warnings
mcs -r:System.Web.dll -r:System.Data Login.aspx.cs
Code:
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class Login : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Page.SetFocus(Login1);
}
protected void Login1_LoggedIn(object sender, EventArgs e)
{
MembershipUser loginUser = Membership.GetUser(Login1.UserName);
bool flag = false;
try
{
SqlDataAdapter DA = new
SqlDataAdapter("SelectSpecificUserAccountNo",
ConfigurationManager.ConnectionStrings["TrakkerDBConnectio
nString1"].ConnectionString);
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the Mono-list
mailing list