Search code examples
c#asp.nethttp-redirectashx

How to redirect/transfer from .ashx file without opening new tab?


Im making some changes to a website i haven't developed before. All links opened via a go.ashx page to verify that it was used by a logged in user.. When the .ashx verifies the user ut openes the URL via context.Response.Redirect(url, true); This openes a new tab, how do i make it just a redirect without the new tab?


Solution

  • I think the problem can be with the links

    <a href="target URL" target="new">anchor text</a>
    

    or even

    <a href="target URL" target="_blank">anchor text</a>
    

    It should be like

    <a href="target URL" target="_self">anchor text</a>
    

    the target should be self.
    If you can post your link then it can be helpful.