0

Hey Guys-

do you have any idea how to redirect on another page after Response.End() ? I want once file download compelte it will redirect user on another page.

I have tried a lot but didn't get any success. If you have any idea to achieve this then please let me know.

Thanks in advance !
Rohan

3
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by dnanetwork
0

not possible even i tried.
i think u need to add a button which will perform redirection.

Thanks for your answer...But no i can't use the extra button, it';s the requirement that once file get download by user, he/she will redirect to another page.

0

Thanks for your answer...But no i can't use the extra button, it';s the requirement that once file get download by user, he/she will redirect to another page.

Try some other way of downloading. Because Response.End(0 will stop the page script.

0

you can try making a use of javascript to hit the pop up which will call the download and next you can redirect user..

try this..

0
// Code Behind

 protected void LinkButton1_Click(object sender, EventArgs e)
    {
        Response.Redirect("~/Default2.aspx");
    }
// Aspx Page..
<head runat="server">

    <script type="text/javascript" language="javascript">
        function myfunction() {
            window.open('default3.aspx', 'download Page')
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:DropDownList ID="DropDownList1" runat="server" Height="16px">
        </asp:DropDownList>
        <asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="myfunction();" OnClick="LinkButton1_Click">LinkButton</asp:LinkButton>
    </div>
    </form>
</body>

i've checked this it works like a charm...!
hope that helps

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.