how can I simulate hyperlink.target=”_parent” with response.redirect in ASP.NET codebehind (C#), I want to redirect to a page (from code behind) but as I’m in a 2-frame window, the whole page should be redirected, i.e. something like hyperlink.target=”_parent”, I suppose it should be possible via JavaScript, can you give some help please? I want something cross-browser of course
thanks
You can manipulate other frames/windows only on the client-side (through javascript, user interaction etc.)
Response.Redirectis a server-side construction; the server doesn’t know anything about your frames and cannot perform the necessary action. The workaround could be to say the page to execute javascript code when it will be returned to the client.So
ClientScript.RegisterStartupScriptmethod (you already mentioned it in your comment) could be the best option here.