2
Answers

Not able to understand what this error is,please have a look?

rani m  mk

rani m mk

12y
1.6k
1
Hi,

error is as below:

exc = {Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack

My code which gives the error is  as below :

protected void btnlogin_Click(object sender, EventArgs e)
        {

            int result = 0;
            try
            {
                if ((ValidationBAL.IsPresent(txtUserName, "UserName") &&                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ValidationBAL.IsPresent(txtpassword, "Password")) == true)
                {
                    result = DMLObj.Validate_Login(txtUserName.Text, txtpassword.Text);
                    if (result == 1)
                    {
                        Response.Redirect("~/Address/frmContacts.aspx");
                        Session["User"] = txtUserName.Text;
                    }
                    else if (result == 0)
                    {
                        lblmsg.Text = "Invalid Login!";
                        pnlLogin.Visible = true;
                       
                    }
                }
            }
            catch (Exception exc)
            {
                throw exc;
            }
}











Answers (2)