Welcome Guest Search | Active Topics | Sign In | Register

Progressbar not worked with AJAXUploader. Please help! Options
runatServer
Posted: Monday, November 14, 2011 2:09:11 PM
Rank: Newbie
Groups: Member

Joined: 2/15/2011
Posts: 6
This is my code:


<%@ Page Language="C#" %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="System.Web" %>
<%@ Import Namespace="System.Web.UI" %>
<%@ Import Namespace="System.Web.UI.WebControls" %>
<%@ Register assembly="EO.Web" namespace="EO.Web" tagprefix="eo" %>

<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{

}

protected void Button1_Click(object sender, EventArgs e)
{
Literal1.Text += string.Format("You have uploaded {0} file(s).<hr />", AJAXUploader1.PostedFiles.Length);
Literal1.Text += TextBox1.Text;
}

protected void AJAXUploader1_FileUploaded(object sender, EventArgs e)
{

}
</script>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title></title>
<style type="text/css">

body
{
padding:10px;
margin:10px;
font-family:Arial;
}

.browse_button_style
{
background-color: #e9f2f8;
}

.uploader_button_style
{
background-color: #e9f2f8;
border: #336699 1px solid;
}

.uploader_delete_button_style
{
background-color: #e9f2f8;
border: #336699 1px solid;
}

</style>
</head>
<body>
<form id="form1" runat="server">
<div style="width:500px;">
<fieldset>
<legend>
My form
</legend>
<eo:callbackpanel ID="CallbackPanel1" runat="server"
Triggers="{ControlID:Button1;Parameter:}">
<table border="0" cellpadding="3" cellspacing="0">
<tr>
<td>
Title (Alt):<br />
<asp:TextBox ID="TextBox1" runat="server" />
</td>
</tr>
<tr>
<td>
Image
<br />
<eo:AJAXUploader
ID="AJAXUploader1"
runat="server"
TempFileLocation="~/App_Data/Temp_EO_AjaxUploader"
AutoUpload="true"
HideDisabledToolBarButton="true"
AutoPostBack="false"
MaxDataSize="300000"
ClientSideOnError="eo_AJAXUploader_CustomErrorHandler"
Width="330px"
OnFileUploaded="AJAXUploader1_FileUploaded">
<BrowseButtonStyle CssClass="browse_button_style"></BrowseButtonStyle>
<DeleteButtonStyle CssClass="uploader_delete_button_style"></DeleteButtonStyle>
<UploadButtonStyle CssClass="uploader_button_style"></UploadButtonStyle>
<CancelButtonStyle CssClass="uploader_button_style"></CancelButtonStyle>
<LayoutTemplate>
<table cellspacing="0" cellpadding="0" border="0">
<tr>
<td colspan="3">
<asp:PlaceHolder ID="PostedFilesPlaceHolder" runat="server" />
<asp:Button ID="DeleteButton" runat="server" Text="מחק" />
</td>
</tr>
<tr>
<td style="width:180px;">
<asp:PlaceHolder ID="InputPlaceHolder" runat="server" />
</td>
<td style="padding: 0 0px 0 0; width:50px;">
<asp:Button ID="UploadButton" runat="server" Text="אישור" />
</td>
<td style="padding: 0 0px 0 0; width:100px;">
<eo:ProgressBar
ID="ProgressBar1"
runat="server"
Width="100px"
ShowPercentage="true"
ControlSkinID="Windows_XP">
</eo:ProgressBar>
</td>
</tr>
</table>
</LayoutTemplate>
</eo:AJAXUploader>
</td>
</tr>
<tr>
<td>
<asp:Button ID="Button1" runat="server" Text="OK" OnClick="Button1_Click" />
</td>
</tr>
</table>
<asp:Literal ID="Literal1" runat="server"></asp:Literal>
</eo:callbackpanel>
</fieldset>
</div>
</form>
<script type="text/javascript">
function eo_AJAXUploader_CustomErrorHandler(uploader, error, message) {
window.alert("Error: " + "\r\n" + error);
}
</script>
</body>
</html>

Please help! Thanks!
eo_support
Posted: Monday, November 14, 2011 4:14:53 PM
Rank: Administration
Groups: Administration

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

The ID of your ProgressBar control must be "ProgressBar" (your is "ProgressBar1"):

http://doc.essentialobjects.com/library/1/eo.web.ajaxuploader.layouttemplate.aspx

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.