Jul 10, 2014, 11:28 AM
[CLOSED] submitting file to ashx in IE browser
IE popups a dialog to save a json file in the example bellow.Which is not true in other browsers
<ext:FormPanel runat="server" ID="frmUploadImage" Layout="HBoxLayout" AnchorHorizontal="100%" BodyStyle="background-color:transparent" Border="false" Url="~/handlers/project_images.ashx/saveNewImages">
<Items>
<ext:FileUploadField runat="server" ID="fufImageUpload" AllowBlank="false" ValidateBlank="true" Text="" Name="fileUpload" Width="400" LabelWidth="125">
</ext:FileUploadField>
<ext:Button runat="server" ID="btnSaveImage" Text="Upload" Icon="DiskUpload" Flat="false">
<Listeners>
<Click Handler="Ext.getCmp('frmUploadImage').getForm().submit() ">
</Click>
</Listeners>
</ext:Button>
</ext:FormPanel>
the handler returns msgBox.Show(new MessageBoxConfig()
{
Icon = MessageBox.Icon.ERROR,
Message = "Images size exceeds maximum allowed (1MB)!!!",
Title = "Project Images",
Fn = new JFunction { Handler = "mssoc.templates.fn.setFileUploadCaption();Ext.getStore('storeImageManagement').load();" }
}
return new DirectResponse(msgBox.ToScript());
In non IE browsers the messagebox box displays just fine but in IE it popups a dialog to download the json file.The content type is set correctly "application/json";
Last edited by Daniil; Jul 14, 2014 at 10:19 AM.
Reason: [CLOSED]