PDA

View Full Version : Download File using DirectEvent (MVC)



dnakorea
Mar 25, 2021, 3:48 PM
I have problem download file using DirectEvent in mvc (asp.net core mvc page)

Error message is "BADRESPONSE: Invalid or unexpected token"

"K�zR\ ���,xl/workbook.xml���N�0 E%�3�2�ڎ�� v��I��5�S%���זݱ�e�;�� �7ʅ���kZ0$.y�� 78N�ֿ�|~M�l꽔~aV]{k��)bi�JR��rD�c>ٲfB_f"��ݷmg#�������4��bdi� s͞|�{����;��[Ow�C�6��1J!����.�D��2-��}�y-`�4�?��?ͧPK�zRx>nY% ���"

[cshtml page code]



<ext-button tooltip="Excel Download" iconCls="fal fa-cloud-download" variant="Warning">
<directEvents>
<click actionName="dataDownload" method="POST">
<eventMask>
<ext-eventMask showMask="true" msg="@localizer["textSaving..."].Value" />
</eventMask>
<extraParams>
<ext-add key="paramA" value="App.comboA.getValue()" mode="Raw" />
<ext-add key="paramB" value="App.comboB.getValue()" mode="Raw" />
</extraParams>
</click>

</directEvents>
</ext-button>

fabricio.murta
Mar 25, 2021, 4:54 PM
Hello @dnakorea!

We have a recent discussion on this, please refer to this forum thread: Download File using DirectEvent (https://forums.ext.net/showthread.php?63101).

Hope this helps!

dnakorea
Mar 26, 2021, 1:31 AM
my problem solved.