<ext:Window ID="ShowAddAppDetailsWindow" runat="server" title="应用的添加" AutoShow="false" Modal="true" ShowOnLoad="false" Width="400" Height="300" ButtonAlign="Right">
            <Body>
                <ext:BorderLayout ID="BorderLayout2" runat="server">
                    <Center Margins-Left ="5" Margins-Right="5" Margins-Top="5" Collapsible="true" Margins-Bottom="5">
                        <ext:FormPanel runat="server"  BodyStyle="padding:5px;" ID="fmApplicationDetails">
                            <Body>
                                <ext:FormLayout ID="FormLayout3" runat="server">
                                    <ext:Anchor>
                                        <ext:TextField runat="server" ID="txtAppId" FieldLabel="ID" Width="160" Disabled="true" ></ext:TextField>
                                    </ext:Anchor>
                                    <ext:Anchor>
                                        <ext:TextField runat="server" ID="txtAppConfig" FieldLabel="Key" Width="160" Disabled="false" ></ext:TextField>
                                    </ext:Anchor>
                                    <ext:Anchor>
                                        <ext:TextField runat="server" ID="txtAppName" FieldLabel="名称" Width="160" Disabled="false" ></ext:TextField>
                                    </ext:Anchor>
                                    <ext:Anchor>
                                        <ext:ComboBox ID="txtAppStatus" FieldLabel="状态" runat="server" Width="160" Disabled="false" Editable="false">
                                            <Items>
                                                <ext:ListItem Text="启用"  Value="0"/>
                                                <ext:ListItem Text="禁用"  Value="1"/>
                                            </Items>
                                        </ext:ComboBox>
                                    </ext:Anchor>
                                    <ext:Anchor>
                                        <ext:FileUploadField ID="fufImage" runat="server"   FieldLabel="图片路径" Width="160"  EmptyText="请选择图片" Disabled="false" ></ext:FileUploadField>
                                    </ext:Anchor>
                                    <ext:Anchor>
                                        <ext:Button ID="btnSaveImage" runat="server" Text="保存图片" Disabled="false" >
                                            <AjaxEvents>
                                                <Click OnEvent="SaveImage_Click" />
                                            </AjaxEvents>
                                        </ext:Button>
                                    </ext:Anchor>上面是前台代码,不知道为什么,我添加了FILEUPLOADFIELD这个控件后,就会报错,说我txtAppConfig为空(我在后台做了验证的)其实是有数据,删掉这个控件又可以,而且我用了Disabled="false",我编辑的时候Disabled=true改了,画面上也有值,但是点保存画面后,就会提示上面所说的, 那个值为空,求解

解决方案 »

  1.   

    你在后台代码中去设置试试,哥们主要去判断回发哦if(!IsPostBack){
      绑定数据
    }string filename = FileUpload1.FileName;              //获取Execle文件名
    你是这样子去拿值的么
      

  2.   

    [Quote=引用 1 楼 lmaohuanl 的回复:]
    你在后台代码中去设置试试,哥们主要去判断回发哦if(!IsPostBack){
      绑定数据
    }string filename = FileUpload1.FileName; //获取Execle文件名
    你是这样子去拿值的么
    Path.GetFileName(this.fufImage.FileName)我是这样取文件名的
      

  3.   

    我把disabled换成readonly了,就OK了,不知道为什么用disabled就是娶不到值