Jan 15, 2013, 12:54 AM
[CLOSED] FileUploadFile cleared right after submit
Sample to reproduce below. Select a file then hit save. The content of the FileUploadField textbox is cleared and the empty text is shown. Am I missing something?
I tested with the latest SVN trunk as of right now and I also reproduced the problem in Ext.net 2.1.1.
I tested with the latest SVN trunk as of right now and I also reproduced the problem in Ext.net 2.1.1.
<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
<title>FormPanel - Ext.NET Examples</title>
<link href="/resources/css/examples.css" rel="stylesheet" />
<style>
#fi-button-msg {
border: 2px solid #ccc;
padding: 5px 10px;
background: #eee;
margin: 5px;
float: left;
}
</style>
</head>
<body>
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<form id="Form1" runat="server">
<h2>Form Example</h2>
<p>The FileUploadField can also be used in standard form layouts, with support for anchoring, validation (the
field is required in this example), empty text, etc.</p>
<ext:FormPanel
ID="BasicForm"
runat="server"
Width="500"
Frame="true"
Title="File Upload Form"
PaddingSummary="10px 10px 0 10px"
LabelWidth="50"
Url=".">
<Defaults>
<ext:Parameter Name="anchor" Value="95%" Mode="Value" />
<ext:Parameter Name="allowBlank" Value="false" Mode="Raw" />
<ext:Parameter Name="msgTarget" Value="side" Mode="Value" />
</Defaults>
<Items>
<ext:FileUploadField
ID="FileUploadField1"
runat="server"
EmptyText="Select an image"
FieldLabel="Photo"
ButtonText=""
Icon="ImageAdd"
/>
</Items>
<Buttons>
<ext:Button ID="SaveButton" runat="server" Text="Save" >
<Listeners>
<Click Handler="#{BasicForm}.getForm().submit();">
</Click>
</Listeners>
</ext:Button>
<ext:Button ID="Button2" runat="server" Text="Reset">
<Listeners>
<Click Handler="#{BasicForm}.getForm().reset();" />
</Listeners>
</ext:Button>
</Buttons>
</ext:FormPanel>
</form>
</body>
</html>
Last edited by Daniil; Jan 15, 2013 at 4:03 AM.
Reason: [CLOSED]