Posted on: 7/21/2013 3:58:54 PM | Views : 247

Hi,
I am getting this exception-object reference not set to an instance in the below code.
in aspx.cs file
-------------------------------------------------------------------
if (IsPostBack) { Page.Validate();
if (Page.IsValid) { try { if (!account.Exist(1)) { account.Insert(txtUserName.Text, txtPassword.Text, txtEmail.Text); } else { account.Update(1, txtUserName.Text, txtPassword.Text, txtEmail.Text); } ProcessAdministratorName(); ProcessAccountRoles();
Response.Redirect("setup4.aspx"); } catch (Exception err) { lblError.Text = "Sorry, the following error occured: " + err.Message; }

the bussines logic of exists func
-------------------------------------------------------------------------
public bool Exist(int AccountID) { // SELECT AccountID // ...

Go to the complete details ...