Hi,
StartButton must be a button. So that will not work for you. You will need to use JavaScript to start the progress bar:
Code: JavaScript
function start_progress_bar()
{
eo_GetObject("ProgressBar1").startTask();
}
However how to call this function depends on whether your ToolBar triggers server event. If your toolbar triggers server event (when AutoPostBack is set to true), you can use the following solution:
1. Place an asp:Label into your page after the ProgressBar;
2. Handle the ToolBar's ItemClick. Inside this event handler you would set the Label's Text to
"<script type='text/javascript'>start_progress_bar()</script>";
This way when the Label is rendered, start_progress_bar get called.
If the toolbar's AutoPostBack is set to false, you will want to handle the toolbar's ClientSideOnItemClick event:
Code: HTML/ASPX
<eo:ToolBar ClientSideOnItemClick="toolbar_click_handler" .....>
.....
</eo:ToolBar>
Code: JavaScript
function toolbar_click_handler(toolbar, toolbarItem, subMenu)
{
if (toolbarItem.getCommandName() == "Save")
start_progress_bar();
}
You can find detailed information about client side JavaScript objects at here:
http://www.essentialobjects.com/ViewDoc.aspx?t=clientapi_howto.htmlThanks