hi friends please help me
i am using asp.net 3.5 and using i took a web project
i have a class which is UserControlEventArgs.cs which is
using System;
public class UserControlEventArgs : EventArgs
{
public UserControlEventArgs(bool InsertComplete)
{
if (InsertComplete)
{
this.InsertComplete = true;
}
else
{
this.InsertComplete = false;
}
}
private bool _InsertComplete;
public bool InsertComplete{
get { return _InsertComplete ; }
set { _InsertComplete = value; }
}
}
public delegate void ClubInsertedEventHandler(object sender, UserControlEventArgs e);
And one web user control is WebUserControlAddUser.ascx
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class WebUserControlAddUser : System.Web.UI.UserControl
{
public event ClubInsertedEventHandler ClubInsertComplete;
protected void FormView1_Load(object sender, EventArgs e)
{
FormView1.ChangeMode(FormViewMode.Insert);
}
protected void FormView1_ItemCommand(object sender, FormViewCommandEventArgs e)
{
UserControlEventArgs args;
switch (e.CommandName)
{
case "StartInsert":
break;
case "CommitInsert":
InsertNewClub();
FormView1.ChangeMode(FormViewMode.ReadOnly);
args = new UserControlEventArgs(true);
ClubInsertComplete(this, args);
break;
case "CancelInsert":
FormView1.ChangeMode(FormViewMode.ReadOnly);
FormView1.DataBind();
args = new UserControlEventArgs(false);
ClubInsertComplete(this, args);
break;
default:
break;
}
}
protected void InsertNewClub()
{
TextBox tb;
tb = (TextBox)FormView1.FindControl("ClubID");
int ClubID = Convert.ToInt32(tb.Text);
tb = (TextBox)FormView1.FindControl("ClubName");
string ClubName = tb.Text;
tb = (TextBox)FormView1.FindControl("URL");
string url = tb.Text;
ClubList.AddClub(ClubID, ClubName, url);
}
}
i am confused about assembly reference ."you are missing a using directive or an assembly reference"
why the error comes when i run the program
i have made that line bold please check