tags:

views:

15

answers:

1

hi,

i am getting this error: Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.

and this is my code where i am getting error.

if (Session["edit"].ToString() == "y" || Session["master"].ToString() == "y" || Session["del"].ToString() == "y")
                {
                    btncancel.Text = "Cancel";
                    //txtprodesc.Text = txtpronm.Text = "";
                    ds = new DataSet();
                    ds =settcls.SelectallproductSuppliersetting();
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        btnsave.Enabled = btnedit.Enabled = false;
                        txtsetproductid.Visible = false;
                        txtpreid.Visible = true;
                        lbmsg.Visible = true;
                        lbmsg.Text = "Enter Productid";
                        txtpreid.Focus();

                        Response.Redirect(this.Page.AppRelativeVirtualPath);
                    }
A: 

Doing the redirection, or the previous code in parenthesis is not run. Also this is a message from debug... right ? I think that in release mode can throw this message because can not make the trace or something, but this is not actually the problem.

Aristos
Mr. Aristos i solve the problem i search in google and i get answer for this i write like this: Response.Redirect(this.Page.AppRelativeVirtualPth,false);
Surya sasidhar