Welcome Guest Search | Active Topics | Sign In | Register

ViewState is not enabled on AJAXPostedFileList Options
Eric Beck
Posted: Friday, May 6, 2011 11:10:30 AM
Rank: Member
Groups: Member

Joined: 9/15/2009
Posts: 10
I've just put a web application live that uses the AJAX Upload control. I'm getting the following error.

"ViewState is not enabled on AJAXPostedFileList 'AJAXPostedFileList1' or one of its parent control. AJAXPostedFileList requires ViewState to be enabled, or SessionVarName to be set to function properly."

I've set 'AJAXPostedFileList1' enableviewstate and I'm still getting the error.


Code is below:
Code: HTML/ASPX
<eo:editor 
ID="Editor1" 
runat="server" 
Font-Bold="False" 
Font-Italic="False" 
Font-Overline="False" 
Font-Strikeout="False" 
Font-Underline="False" 
Height="320px"
HighlightColor="255, 255, 192" 
Width="100%" 
EnableViewState="true"
ToolBarSet="Basic" 
SpellCheckerID="SpellChecker1" 
FileExplorerUrl="~/Admin/Explorer.aspx"
FileExplorerDialogID="FileExplorerDialog1">
    <FooterStyle CssText="border-right: gray 1px solid; padding-right: 2px; border-top: gray 1px; padding-left: 2px; padding-bottom: 2px; border-left: gray 1px solid; padding-top: 2px; border-bottom: gray 1px solid; background-color: #fafafa" />
    <BreadcrumbItemStyle CssText="border-right: darkgray 1px solid; padding-right: 3px; border-top: darkgray 1px solid; margin-top: 1px; padding-left: 3px; font-size: 12px; padding-bottom: 1px; border-left: darkgray 1px solid; padding-top: 1px; border-bottom: darkgray 1px solid; font-family: tahoma" />
    <EmoticonStyle CssText="background-color:white;border-bottom-color:#c5d3ed;border-bottom-style:solid;border-bottom-width:1px;border-left-color:#c5d3ed;border-left-style:solid;border-left-width:1px;border-right-color:#c5d3ed;border-right-style:solid;border-right-width:1px;border-top-color:#c5d3ed;border-top-style:solid;border-top-width:1px;padding-bottom:2px;padding-left:2px;padding-right:2px;padding-top:2px;" />
    <BreadcrumbItemHoverStyle CssText="border-right: darkgray 1px solid; padding-right: 3px; border-top: darkgray 1px solid; margin-top: 1px; padding-left: 3px; font-size: 12px; padding-bottom: 1px; border-left: darkgray 1px solid; padding-top: 1px; border-bottom: darkgray 1px solid; font-family: tahoma; background-color:#e0e0e0;" />
    <HeaderStyle CssText="border-right: gray 1px solid; border-top: gray 1px solid; border-left: gray 1px solid; border-bottom: gray 1px" />
    <BreadcrumbItemSeparatorStyle CssText="width: 3px; height: 10px" />
    <EmoticonDropDownStyle CssText="border-top: gray 1px solid; border-right: gray 1px solid; padding-right: 2px; border-top: gray 1px; padding-left: 2px; padding-bottom: 2px; border-left: gray 1px solid; padding-top: 2px; border-bottom: gray 1px solid; background-color: #fafafa" />
    <BreadcrumbLabelStyle CssText="padding-right: 6px; padding-left: 6px; font-size: 12px; padding-top: 1px; font-family: tahoma" />
    <CustomHeaderTemplate>
        <eo:ToolBar ID="ToolBar0" runat="server" BackgroundImage="00100103" BackgroundImageLeft="00100101"
            BackgroundImageRight="00100102" SeparatorImage="00100104" Width="100%">
            <Items>
                <eo:ToolBarItem CommandName="New" ImageUrl="00101022" ToolTip="New">
                </eo:ToolBarItem>
                <eo:ToolBarItem Type="Separator">
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="Copy" ImageUrl="00101007" ToolTip="Copy">
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="Cut" ImageUrl="00101008" ToolTip="Cut">
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="Paste" ImageUrl="00101009" ToolTip="Paste">
                </eo:ToolBarItem>
                <eo:ToolBarItem Type="Separator">
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="Undo" ImageUrl="00101023" ToolTip="Undo">
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="Redo" ImageUrl="00101024" ToolTip="Redo">
                </eo:ToolBarItem>
                <eo:ToolBarItem Type="Separator">
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="Find" ImageUrl="00101032" ToolTip="Find">
                </eo:ToolBarItem>
                <eo:ToolBarItem Type="Separator">
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="InsertOrEditImage" ImageUrl="00101033" ToolTip="Insert Image">
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="InsertOrEditLink" ImageUrl="00101021" ToolTip="Insert Link">
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="InsertOrEditAnchor" ImageUrl="00101025" ToolTip="Insert Anchor">
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="RemoveLink" ImageUrl="00101026" ToolTip="Remove Link">
                </eo:ToolBarItem>
                <eo:ToolBarItem Type="Separator">
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="InsertOrEditTable" ImageUrl="00101031" ToolTip="Insert Table">
                </eo:ToolBarItem>
                <eo:ToolBarItem Type="Separator">
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="Indent" ImageUrl="00101027" ToolTip="Indent">
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="Outdent" ImageUrl="00101028" ToolTip="Outdent">
                </eo:ToolBarItem>
                <eo:ToolBarItem Type="Separator">
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="ForeColor" ImageUrl="00101029" ToolTip="Fore Color"
                    Type="DropDownMenu">
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="BackColor" ImageUrl="00101030" ToolTip="Back Color"
                    Type="DropDownMenu">
                </eo:ToolBarItem>
                <eo:ToolBarItem Type="Separator">
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="SpellCheck" ImageUrl="00101018" ToolTip="Spell Check">
                </eo:ToolBarItem>
            </Items>
            <ItemTemplates>
                <eo:ToolBarItem Type="Custom">
                    <NormalStyle CssText="background-color:transparent;border-bottom-style:none;border-left-style:none;border-right-style:none;border-top-style:none;padding-bottom:1px;padding-left:2px;padding-right:2px;padding-top:2px;" />
                    <HoverStyle CssText="background-color:transparent;border-bottom-style:none;border-left-style:none;border-right-style:none;border-top-style:none;padding-bottom:1px;padding-left:2px;padding-right:2px;padding-top:2px;" />
                    <DownStyle CssText="background-color:transparent;border-bottom-style:none;border-left-style:none;border-right-style:none;border-top-style:none;padding-bottom:1px;padding-left:2px;padding-right:2px;padding-top:2px;" />
                </eo:ToolBarItem>
                <eo:ToolBarItem Type="DropDownMenu">
                    <NormalStyle CssText="padding-right: 4px; padding-left: 4px; padding-bottom: 3px; border-top-style: none; padding-top: 3px; border-right-style: none; border-left-style: none; border-bottom-style: none; cursor:hand; background-image: url(00100105); background-position-x: right;" />
                    <HoverStyle CssText="border-right: #335ea8 1px solid; padding-right: 3px; border-top: #335ea8 1px solid; padding-left: 3px; padding-bottom: 2px; border-left: #335ea8 1px solid; padding-top: 2px; border-bottom: #335ea8 1px solid; background-color: #c2cfe5; cursor:hand; background-image: url(00100106); background-position-x: right;" />
                    <DownStyle CssText="border-right: #335ea8 1px solid; padding-right: 2px; border-top: #335ea8 1px solid; padding-left: 4px; padding-bottom: 2px; border-left: #335ea8 1px solid; padding-top: 3px; border-bottom: none; background-color:transparent; cursor:hand; background-image: url(00100105); background-position-x: right;" />
                </eo:ToolBarItem>
            </ItemTemplates>
            <NormalStyle CssText="padding-right: 4px; padding-left: 4px; padding-bottom: 3px; border-top-style: none; padding-top: 3px; border-right-style: none; border-left-style: none; border-bottom-style: none; cursor:hand; FONT-SIZE: 12px; FONT-FAMILY: Tahoma;" />
            <HoverStyle CssText="border-right: #335ea8 1px solid; padding-right: 3px; border-top: #335ea8 1px solid; padding-left: 3px; padding-bottom: 2px; border-left: #335ea8 1px solid; padding-top: 2px; border-bottom: #335ea8 1px solid; background-color: #c2cfe5; cursor:hand; FONT-SIZE: 12px; FONT-FAMILY: Tahoma;" />
            <DownStyle CssText="border-right: #335ea8 1px solid; padding-right: 2px; border-top: #335ea8 1px solid; padding-left: 4px; padding-bottom: 1px; border-left: #335ea8 1px solid; padding-top: 3px; border-bottom: #335ea8 1px solid; background-color: #99afd4; cursor:hand; FONT-SIZE: 12px; FONT-FAMILY: Tahoma;" />
        </eo:ToolBar>
        <eo:ToolBar ID="ToolBar1" runat="server" BackgroundImage="00100103" BackgroundImageLeft="00100101"
            BackgroundImageRight="00100102" SeparatorImage="00100104" Width="100%">
            <Items>
                <eo:ToolBarItem CommandName="Styles" ToolTip="Styles" Type="Custom">
                    <CustomItem>
                        <asp:DropDownList ID="StyleDropDown" runat="server" Style="width: 80px">
                        </asp:DropDownList>
                    </CustomItem>
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="Fonts" ToolTip="Fonts" Type="Custom">
                    <CustomItem>
                        <asp:DropDownList ID="FontDropDown" runat="server" Style="width: 110px">
                        </asp:DropDownList>
                    </CustomItem>
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="FontSizes" ToolTip="Font Sizes" Type="Custom">
                    <CustomItem>
                        <asp:DropDownList ID="FontSizeDropDown" runat="server" Style="width: 50px">
                        </asp:DropDownList>
                    </CustomItem>
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="Bold" ImageUrl="00101011" ToolTip="Bold">
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="Italic" ImageUrl="00101012" ToolTip="Italic">
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="Underline" ImageUrl="00101013" ToolTip="Underline">
                </eo:ToolBarItem>
                <eo:ToolBarItem Type="Separator">
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="AlignLeft" ImageUrl="00101014" ToolTip="Align Left">
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="AlignCenter" ImageUrl="00101015" ToolTip="Align Center">
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="AlignRight" ImageUrl="00101016" ToolTip="Align Right">
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="AlignJustify" ImageUrl="00101017" ToolTip="Align Justify">
                </eo:ToolBarItem>
                <eo:ToolBarItem Type="Separator">
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="BulletList" ImageUrl="00101019" ToolTip="Bullet List">
                </eo:ToolBarItem>
                <eo:ToolBarItem CommandName="NumberedList" ImageUrl="00101020" ToolTip="Numbered List">
                </eo:ToolBarItem>
                <eo:ToolBarItem Type="Separator">
                </eo:ToolBarItem>
                    <eo:ToolBarItem Text="Attachments" ToolTip="Attachments" ImageUrl="00101059" CommandName="Upload">
                    </eo:ToolBarItem>
                    <eo:ToolBarItem Text="Cancel Upload" ToolTip="Cancel Upload" ImageUrl="00101059"
                        CommandName="CancelUpload">
                    </eo:ToolBarItem>
            </Items>
            <ItemTemplates>
                <eo:ToolBarItem Type="Custom">
                    <NormalStyle CssText="background-color:transparent;border-bottom-style:none;border-left-style:none;border-right-style:none;border-top-style:none;padding-bottom:1px;padding-left:2px;padding-right:2px;padding-top:2px;" />
                    <HoverStyle CssText="background-color:transparent;border-bottom-style:none;border-left-style:none;border-right-style:none;border-top-style:none;padding-bottom:1px;padding-left:2px;padding-right:2px;padding-top:2px;" />
                    <DownStyle CssText="background-color:transparent;border-bottom-style:none;border-left-style:none;border-right-style:none;border-top-style:none;padding-bottom:1px;padding-left:2px;padding-right:2px;padding-top:2px;" />
                </eo:ToolBarItem>
                <eo:ToolBarItem Type="DropDownMenu">
                    <NormalStyle CssText="padding-right: 4px; padding-left: 4px; padding-bottom: 3px; border-top-style: none; padding-top: 3px; border-right-style: none; border-left-style: none; border-bottom-style: none; cursor:hand; background-image: url(00100105); background-position-x: right;" />
                    <HoverStyle CssText="border-right: #335ea8 1px solid; padding-right: 3px; border-top: #335ea8 1px solid; padding-left: 3px; padding-bottom: 2px; border-left: #335ea8 1px solid; padding-top: 2px; border-bottom: #335ea8 1px solid; background-color: #c2cfe5; cursor:hand; background-image: url(00100106); background-position-x: right;" />
                    <DownStyle CssText="border-right: #335ea8 1px solid; padding-right: 2px; border-top: #335ea8 1px solid; padding-left: 4px; padding-bottom: 2px; border-left: #335ea8 1px solid; padding-top: 3px; border-bottom: none; background-color:transparent; cursor:hand; background-image: url(00100105); background-position-x: right;" />
                </eo:ToolBarItem>
            </ItemTemplates>
            <NormalStyle CssText="padding-right: 4px; padding-left: 4px; padding-bottom: 3px; border-top-style: none; padding-top: 3px; border-right-style: none; border-left-style: none; border-bottom-style: none; cursor:hand; FONT-SIZE: 12px; FONT-FAMILY: Tahoma;" />
            <HoverStyle CssText="border-right: #335ea8 1px solid; padding-right: 3px; border-top: #335ea8 1px solid; padding-left: 3px; padding-bottom: 2px; border-left: #335ea8 1px solid; padding-top: 2px; border-bottom: #335ea8 1px solid; background-color: #c2cfe5; cursor:hand; FONT-SIZE: 12px; FONT-FAMILY: Tahoma;" />
            <DownStyle CssText="border-right: #335ea8 1px solid; padding-right: 2px; border-top: #335ea8 1px solid; padding-left: 4px; padding-bottom: 1px; border-left: #335ea8 1px solid; padding-top: 3px; border-bottom: #335ea8 1px solid; background-color: #99afd4; cursor:hand; FONT-SIZE: 12px; FONT-FAMILY: Tahoma;" />
        </eo:ToolBar>
    </CustomHeaderTemplate>
    <CustomFooterTemplate>
        <div style="width: 200px; float: left">
            <asp:PlaceHolder ID="ViewTabs" runat="server"></asp:PlaceHolder>
        </div>
        <div>
            <asp:PlaceHolder ID="Breadcrumb" runat="server"></asp:PlaceHolder>
            <br />
        </div>

            <eo:AJAXPostedFileList ID="AJAXPostedFileList1" EnableViewState="true" runat="server">
            </eo:AJAXPostedFileList>
            <eo:CallbackPanel runat="server" ID="CallbackPanel1" Triggers="{ControlID:AttachmentAJAXUploader;Parameter:},{ControlID:Repeater1;Parameter:}" Style="clear: both">
                <asp:Panel runat="server" ID="Panel1" Visible="False">
                    Attachments:
                    <asp:Repeater runat="server" ID="Repeater1" OnItemDataBound="Repeater1_ItemDataBound" OnItemCommand="Repeater1_ItemCommand">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="FileNameLabel"></asp:Label>
                            (<asp:LinkButton runat="server" ID="lblDelete">Delete</asp:LinkButton>)  
                        </ItemTemplate>
                    </asp:Repeater>
                </asp:Panel>
            </eo:CallbackPanel>
            <div id="uploader_div" style="display: none">
                <eo:AJAXUploader ID="AttachmentAJAXUploader" Width="95%" runat="server" AutoUpload="True"
                    HideDisabledToolBarButton="True" TempFileLocation="~/app_data" FinalFileLocation="~/app_data"
                    ClientSideOnStart="uploader_start" ClientSideOnDone="uploader_stop" ClientSideOnCancel="uploader_stop"
                    FinalFileList="AJAXPostedFileList1" AutoPostBack="True" OnFileUploaded="AJAXUploader1_FileUploaded">
                    <LayoutTemplate>
                        <table cellspacing="0" cellpadding="2" width="492" border="0">
                            <tr>
                                <td style="padding-top: 5px">
                                    <eo:ProgressBar ID="ProgressBar" runat="server" ControlSkinID="Windows_XP">
                                    </eo:ProgressBar>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:PlaceHolder ID="ProgressTextPlaceHolder" runat="server">Progress Text Place Holder
                                    </asp:PlaceHolder>
                                </td>
                            </tr>
                        </table>
                    </LayoutTemplate>
                </eo:AJAXUploader>
            </div>
    </CustomFooterTemplate>
    <BreadcrumbDropDownStyle CssText="border-top: gray 1px solid; border-right: gray 1px solid; padding-right: 2px; border-top: gray 1px; padding-left: 2px; padding-bottom: 2px; border-left: gray 1px solid; padding-top: 2px; border-bottom: gray 1px solid; background-color: #fafafa" />
    <TabButtonStyles>
        <NormalStyle CssText="border-right: #335ea8 1px; padding-right: 7px; border-top: #335ea8 1px; padding-left: 7px; font-size: 12px; padding-bottom: 3px; border-left: #335ea8 1px; padding-top: 3px; border-bottom: #335ea8 1px; font-family: tahoma; background-color: white" />
        <HoverStyle CssText="border-right: #335ea8 1px solid; padding-right: 6px; border-top: #335ea8 1px solid; padding-left: 6px; font-size: 12px; padding-bottom: 2px; border-left: #335ea8 1px solid; padding-top: 2px; border-bottom: #335ea8 1px solid; font-family: tahoma; background-color: #c2cfe5" />
        <SelectedStyle CssText="border-right: #335ea8 1px solid; padding-right: 6px; border-top: #335ea8 1px solid; padding-left: 6px; font-size: 12px; padding-bottom: 2px; border-left: #335ea8 1px solid; padding-top: 2px; border-bottom: #335ea8 1px solid; font-family: tahoma; background-color: white" />
    </TabButtonStyles>
    <EditAreaStyle CssText="border-right: gray 1px solid; padding-right: 0px; border-top: gray 1px solid; padding-left: 0px; padding-bottom: 0px; border-left: gray 1px solid; padding-top: 0px; border-bottom: gray 1px solid" />

     <DialogTemplates>
        <eo:EditorDialogTemplate>
            <DialogTemplate>
                <eo:Dialog 
                    ID="Dialog1" 
                    runat="server" 
                    AllowResize="True" 
                    CloseButtonUrl="00020440" 
                    ControlSkinID="None" 
                    HeaderHtmlFormat="&lt;div style=&quot;padding-top:4px&quot;&gt;{0}&lt;/div&gt;" 
                    HeaderImageHeight="27" 
                    HeaderImageUrl="00020441" 
                    MinHeight="100" 
                    MinWidth="150">
                    <HeaderStyleActive CssText="background-image:url(00020442);color:#444444;font-family:'trebuchet ms';font-size:10pt;font-weight:bold;padding-bottom:7px;padding-left:8px;padding-right:0px;padding-top:0px;" />
                    <ContentStyleActive CssText="background-color:#f0f0f0;font-family:tahoma;font-size:8pt;padding-bottom:4px;padding-left:4px;padding-right:4px;padding-top:4px" />
                    <FooterStyleActive CssText="background-color:#f0f0f0; padding-right: 4px; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; padding-top: 4px; font-family: tahoma" />
                    <BorderImages BottomBorder="00020409,00020429" 
                        BottomLeftCorner="00020408,00020428" BottomRightCorner="00020410,00020430" 
                        LeftBorder="00020406,00020426" RightBorder="00020407,00020427" 
                        TopBorder="00020402,00020422" TopLeftCorner="00020401,00020421" 
                        TopLeftCornerBottom="00020404,00020424" TopRightCorner="00020403,00020423" 
                        TopRightCornerBottom="00020405,00020425" />
                </eo:Dialog>
            </DialogTemplate>
        </eo:EditorDialogTemplate>
    </DialogTemplates>

</eo:editor>
eo_support
Posted: Friday, May 6, 2011 11:20:56 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,080
Hi,

Whether a control's view state is enabled depends on settings on the control itself and settings on all parent controls. If any parent control's EnableViewState is set to false, then the control won't have view state support.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.