Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Cancel page refresh

$
0
0

Hi,

I have an "export to excel" image button.

When I click on it I run a codebehind function to export a gridview to excel.

<asp:ImageButton ID="excel" runat="server" Height="25px" OnClick="btnExportToExcel_Click"
                            ImageUrl="~/Images/excel.png" ToolTip="Export to Excel"/>

The problem is that the entire page refreshes and I would like to avoid that.

The imagebutton is inside an update panel and it is not one of it's triggers.

I have to postback to server to run the function  but I can't seem to avoid the refresh.

Do I need to add another updatepanel? solve it with javascript?


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>