Hi, i have a master page
and in a placeolder an ascx with a grid, when i try to download the file return me an jscript error, how can i disable the ajax when i try to download?
thanks!
post some code:
and in a placeolder an ascx with a grid, when i try to download the file return me an jscript error, how can i disable the ajax when i try to download?
thanks!
post some code:
<telerik:RadGrid runat="server" ID="rgrDocuments" Skin="Office2010Blue" Height="30%"
ShowStatusBar="True" AllowFilteringByColumn="True" AutoGenerateColumns="false"
CellSpacing="0" GridLines="None" ShowGroupPanel="True"
oncolumncreated="rgrDocuments_ColumnCreated"
onitemcommand="rgrDocuments_ItemCommand">
<GroupingSettings CaseSensitive="false"/>
<ClientSettings AllowDragToGroup="True">
<Selecting AllowRowSelect="true" />
</ClientSettings>
<MasterTableView Width="100%" >
<Columns>
<telerik:GridTemplateColumn AllowFiltering="false">
<ItemTemplate>
<asp:ImageButton runat="server" ID="btnDownload" CommandName="cmdDownload" ImageUrl="~/Images/down.png" Height="24px" Width="24px" />
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn AllowFiltering="false">
<ItemTemplate>
<asp:ImageButton runat="server" ID="btnDelete" CommandName="cmdDelete" ImageUrl="~/Images/elimina.png" Height="24px" Width="24px" />
</ItemTemplate>
</telerik:GridTemplateColumn>
<telerik:GridBoundColumn Visible="false" DataField="N" UniqueName="N°" HeaderText="Anno" AutoPostBackOnFilter="true" CurrentFilterFunction="StartsWith" ShowFilterIcon="false"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="MES" UniqueName="Tipo" HeaderText="<%$ Resources:Documenti, docu_GriTipo %>" AutoPostBackOnFilter="true" CurrentFilterFunction="StartsWith" ShowFilterIcon="false"></telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CIT" UniqueName="Nome" HeaderText="<%$ Resources:Documenti, docu_GriNome %>" AutoPostBackOnFilter="true" CurrentFilterFunction="StartsWith" ShowFilterIcon="false"></telerik:GridBoundColumn>
</Columns>
</MasterTableView>
<FilterMenu EnableImageSprites="False">
</FilterMenu>
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Windows7">
</HeaderContextMenu>
</telerik:RadGrid>
protected void rgrDocuments_ItemCommand(object sender, GridCommandEventArgs e)
{
if (e.CommandName == "cmdDownload")
{
GridDataItem item = e.Item as GridDataItem;
byte[] array = RecuperaBlobDocumento(short.Parse(item["N°"].Text));
string fileName = RecuperaNomeFile(short.Parse(item["N°"].Text));
Response.Clear();
Response.ContentType = "application/octet-stream";
Response.AppendHeader("Content-Disposition", "attachment; filename=" + fileName);
Response.BinaryWrite(array);
Response.End();
}
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1"> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Office2010Black"> </telerik:RadAjaxLoadingPanel> <telerik:RadAjaxPanel ID="RadAjaxPanel1" LoadingPanelID="RadAjaxLoadingPanel1" runat="server" > <asp:ContentPlaceHolder ID="Body" runat="server"/> </telerik:RadAjaxPanel>