简体   繁体   中英

Redirect from .net aspx to html

I am on a .net 4 aspx page and I simply want to redirect to an html page that is located in the same site location. When I try to do the following, I get the error {Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.}

Response.Redirect("ContractorEnvironment.html");

I have to use an aspx page for logging in but my application is on a single html page.

SLaks answered the question:

I have to use a custom login process and needed a try/catch to manage errors but if login is successful, I was redirecting within the try. Simply moved the redirect outside the try.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM