Welcome Guest Search | Active Topics | Sign In | Register

AjaxUploader associated with Toolbar: Browse button displays "?? Browse" Options
David Winningham
Posted: Monday, September 28, 2009 11:55:28 AM
Rank: Newbie
Groups: Member

Joined: 9/28/2009
Posts: 3
I'm associating the AJAXUploader with the Toolbar by setting the AJAXUploader's StartToolBarButton. But when the Browse button is rendered, it displays as "?? Browse". On my form I have:

Code: HTML/ASPX
<asp:Table runat="server" id="AJAXFileUploadTable" >
    <asp:TableRow>
        <asp:TableCell>
            <eo:ToolBar ID="EOToolbar" runat="server" >                                 		    
            </eo:ToolBar>
            
            <eo:AJAXUploader ID="AJAXFileUploader" runat="server" onfileuploaded="AJAXFileUploader_FileUploaded"
                ClientSideOnError="FileUploaderError" ClientSideOnLoad="HideProgBar" ClientSideOnStart="ShowProgBar" 
                ClientSideOnDone="HideProgBar" MaxDataSize="15360">                   
                <LayoutTemplate>
                    <table border="0" cellpadding="2" cellspacing="0" width="250x">
                        <tr>
                            <td>
                                <asp:PlaceHolder runat="server" id="InputPlaceHolder">Input Box Place Holder
                                </asp:PlaceHolder>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                 </td>
                        </tr>
                        <tr>
                            <td>
                                <eo:ProgressBar runat="server" id="ProgressBar" ControlSkinID="Windows_XP" />
                            </td>
                        </tr> 
                    </table>
                </LayoutTemplate>              
            </eo:AJAXUploader>
        </asp:TableCell>
    </asp:TableRow>
</asp:Table>


And in the Page_Load event of the code-behind I have:

Code: C#
protected void Page_Load(object sender, EventArgs e)
    {
        AJAXFileUploader.StartToolBarButton = EOToolbar.ClientID + ":" + "Upload";
    }


What am I doing wrong?

Thanks,
Dave
eo_support
Posted: Monday, September 28, 2009 12:41:39 PM
Rank: Administration
Groups: Administration

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

You would associate the uploader to an existing toolbar button, not to a toolbar. That's why StartToolBarButton contains two pieces of information: The ID of the ToolBar (EOToolBar.ClientID) and the the CommandName of the button ("Upload"). So a toolbar button with CommandName set to "Upload" must exist first.

Thanks!
David Winningham
Posted: Monday, September 28, 2009 12:58:10 PM
Rank: Newbie
Groups: Member

Joined: 9/28/2009
Posts: 3
Hi,

Thanks for the quick reply...

I neglected to include the code in my controls.skin which does create the button. I still have the same problem when I put this code directly in the form:

Code: HTML/ASPX
<asp:TableRow>
        <asp:TableCell>
            <eo:ToolBar ID="EOToolbar" runat="server" Width="250px">   
	            <ItemTemplates>
		            <eo:ToolBarItem Type="Button">
			            <HoverStyle CssText="font-size: 12px; font-family: Verdana, Arial, Tahoma, sans-serif; background-color: ButtonFace; border: 1px solid #000000; cursor: hand; height: 22px"></HoverStyle>
			            <DownStyle CssText="font-size: 12px; font-family: Verdana, Arial, Tahoma, sans-serif; background-color: ButtonFace; border: 1px solid #000000; cursor: hand; height: 22px"></DownStyle>
			            <NormalStyle CssText="font-size: 12px; font-family: Verdana, Arial, Tahoma, sans-serif; background-color: ButtonFace; border: 1px solid #000000; cursor: hand; height: 22px"></NormalStyle>						
		            </eo:ToolBarItem>
	            </ItemTemplates>	            
                <Items>
	                <eo:ToolBarItem Type="Button" Text="Browse" CommandName="Upload"></eo:ToolBarItem>
                </Items>                
            </eo:ToolBar>            
            
            <eo:AJAXUploader ID="AJAXFileUploader" runat="server" onfileuploaded="AJAXFileUploader_FileUploaded"
                ClientSideOnError="FileUploaderError" ClientSideOnLoad="HideProgBar" ClientSideOnStart="ShowProgBar" 
                ClientSideOnDone="HideProgBar" MaxDataSize="15360">                   
                <LayoutTemplate>
                    <table border="0" cellpadding="2" cellspacing="0" width="250x">
                        <tr>
                            <td>
                                <asp:PlaceHolder runat="server" id="InputPlaceHolder">Input Box Place Holder
                                </asp:PlaceHolder>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                 </td>
                        </tr>
                        <tr>
                            <td>
                                <eo:ProgressBar runat="server" id="ProgressBar" ControlSkinID="Windows_XP" />
                            </td>
                        </tr> 
                    </table>
                </LayoutTemplate>              
            </eo:AJAXUploader>
        </asp:TableCell>
    </asp:TableRow>


Thanks.
eo_support
Posted: Monday, September 28, 2009 1:08:18 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
I see. That's normal. The toolbar button displays an image and a text. In your case the toolbar button text is "Browse", because you did not specify an image, it displays "??". If you do not wish to use an image, you can set the button's ImageUrl to "Blank".

Thanks!
David Winningham
Posted: Monday, September 28, 2009 1:22:25 PM
Rank: Newbie
Groups: Member

Joined: 9/28/2009
Posts: 3
That works. Thanks!
eo_support
Posted: Monday, September 28, 2009 1:27:36 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Great. Glad that it works for you!


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.