Hi All,
I have problem with RibbonBar, I have it on my page, it is added to ajaxmanager. The code on the page look like this
<telerik:RibbonBarTab Text="MyApp">
<telerik:RibbonBarGroup Text ="Docs">
<Items >
<telerik:RibbonBarButton ID="rbbHelp" Size="Large" Text="Help" ImageUrlLarge="Ikcsy/Png/Help.png" />
then in code file a have a fuction
protected void RadRibbonBar1_ButtonClick(object sender, RibbonBarButtonClickEventArgs e)
{
switch
(e.Button.Text.ToString())
{
case "Help":
try
{
Response.Clear();
Response.ContentType =
"text/pdf";
Response.AppendHeader("Content-Disposition", "attachment; filename=" + "HelpFile" + ".pdf" );
string file_path ="\\Help\\HelpFile.pdf";
Response.TransmitFile(file_path);
Response.End();
}
catch(Exception ex)
{
}
break;
}
}
after I clicked the button i get an error after Response.End :
ex = {Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.} and after this I get on page jscript error Sys.WebForms.PageRequestManagerParserErrorException. What can I do to download/transmit the file correctly ?
Regargs.
Tomek