Mar 24, 2014, 9:23 AM
[CLOSED] File Postback
I have following cod
for Example as displayed above form submits to the handlers/file_validator.ashx/processFile.
<ext:FormPanel runat="server" ID="frmFileUpload" Title="File Validation" BodyPadding="5"
Url="handlers/file_validator.ashx/processFile" Width = "450">
<Items>
<ext:FileUploadField ID="flUploadfield" FieldLabel="File Name" runat="server" Width="400"
Icon="Attach">
<Listeners>
</Listeners>
</ext:FileUploadField>
<ext:FieldContainer ID="FieldContainer1" runat="server" Layout="HBoxLayout" Width = "400">
<LayoutConfig>
<ext:HBoxLayoutConfig Pack="End">
</ext:HBoxLayoutConfig>
</LayoutConfig>
<Items>
<ext:Button ID="Button1" runat="server" Text="Submit for validation file" Icon="StyleGo">
<Listeners>
<Click Handler="#{frmFileUpload}.getForm().submit();" >
</Click>
</Listeners>
</ext:Button>
</Items>
</ext:FieldContainer>
</Items>
<Buttons>
</Buttons>
<Listeners>
</Listeners>
</ext:FormPanel>
After file submit I am doing some processing and the result must be displayed but unfortunatly I am not able to do sofor Example as displayed above form submits to the handlers/file_validator.ashx/processFile.
public void processFile() {
System.Threading.Thread.Sleep(2000);
string flName =ctx.Request.Files["flUploadfield"].FileName;
//process file and show result
Ext.Net.Window wnd = new Window();
wnd.Width = new System.Web.UI.WebControls.Unit("100px");
wnd.Height = new System.Web.UI.WebControls.Unit("100px");
wnd.Html = "File has been processed";
Ext.Net.ComponentLoader.Render(wnd);
}
because postback occures how to deliver the message from processFile function
Last edited by Daniil; Mar 24, 2014 at 3:39 PM.
Reason: [CLOSED]