ASP.NET Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack -


मुझे उस कोड के साथ समस्या है:

  HttpContext.Current.Response.Redirect (" ~ / उदाहरण / my.aspx "); // या HttpContext.Current.Response.Redirect ("~ / उदाहरण / my.aspx", सच);  

उपर्युक्त कोड त्रुटि को उत्पन्न करता है जैसा मैंने इस विषय के शीर्षक पर वर्णित किया है।

मुझे बस अपने एएसपी.नेट पृष्ठ को ताज़ा करने की आवश्यकता है, मैं इसके बजाय उस कोड का उपयोग नहीं कर सकता:

  HttpContext.Current.Response.AddHeader ("Refresh", " 2 ");  

क्योंकि यह आईआईएस पाइपलाइन मोड के बारे में कहता है

यह puprose है कि मुझे ओनलोड विधि में जाना चाहिए जहां रीफ्रेश / रीडायरेक्ट के बाद कुछ स्थितियां सही हैं

निम्नलिखित कोड के साथ प्रयास करें

strURL = "" ~ // उदाहरण // मेरा Aspx "";

ScriptManager.RegisterStartupScript (यह, यह। GetType (), "लाल", "window.location.href = '" + strURL + "';", सत्य);


Comments

Popular posts from this blog

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -

session - security issue: php login/logout script + back button -

Eclipse and GWT -