Showing posts with label animation. Show all posts
Showing posts with label animation. Show all posts

Wednesday, March 28, 2012

UpdateProgress within treeView

hi...

i have treeView(populate onDemand) in updatePanel, and i want to add updateProgress animation or message, dynamically near to the selected node(parent node), someone have an idea how to implement that?

thanks...

Hi,
???Here are some sample codes about asp:TreeView working with asp:UpdateProgress for your reference.
??? <div>
<asp:UpdatePanel ID="UpdatePanel8" runat="server">
<ContentTemplate>
<asp:TreeView ID="tv" runat="server" OnSelectedNodeChanged="tv_SelectedNodeChanged">
<Nodes>
<asp:TreeNode Text="File" Value="File"></asp:TreeNode>
<asp:TreeNode Text="Edit" Value="Edit"></asp:TreeNode>
<asp:TreeNode Text="View" Value="View"></asp:TreeNode>
</Nodes>
</asp:TreeView>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdateProgress ID="UpdateProgress2" runat="server"
AssociatedUpdatePanelID="UpdatePanel8"
DisplayAfter="2000"
DynamicLayout="False">
<ProgressTemplate>
UpdatePanel1 is updating now!
<input type="button" id="AbortCallbackButton" value="Abort" onclick="AbortCallback()" />
</ProgressTemplate>
</asp:UpdateProgress>
<br />
This is text after the UpdatePanel and UpdateProgress controls.
<script type="text/javascript">
function AbortCallback()
{
Sys.WebForms.PageRequestManager.getInstance().abortPostBack();
}
</script>
</div
protected void tv_SelectedNodeChanged(object sender, EventArgs e)
{
System.Threading.Thread.Sleep(10000);
}
Wish this can give you some helps.

Wednesday, March 21, 2012

Urgent! how to add the animation in update progress

coould any one tell me how to add the aninmation in update progress...this will help me alot...

<asp:UpdateProgress ID="UpdateProgress1" runat="server">
<ProgressTemplate>

<div style="margin-top:60px;">
Update is in Progress.....
</div>
</div>

</ProgressTemplate>
</asp:UpdateProgress>

You can display gif image, in a similar way as you display text e.g.

<div style="margin-top:60px;">
<img id="updateInProgressImage" src="http://pics.10026.com/?src=" alt="Update in Progress" runat="server" /> please wait...
</div>


Thanks for the reply...i have 1 question:

should i put image path in "src" or in "id"? i kept in src and it worked in IE but it won't show on firefox??

also, how can i control the font-size of the "please wait..."?

Use Animation Control with hidden TargetControlID

Hi all,

I use the Animation Control and it works fine. But sometimes I want to hide the target control (an imagebutton) because the animation should not be available. But when I hide the image I always get an error message

Microsoft JScript runtime error: Sys.ArgumentException: AjaxControlToolkit.Animation.Animation.set_animationTarget requires the ID of a Sys.UI.DomElement or Sys.UI.Control. No element or control could be found corresponding to "ctl00_PlaceHolderMain_ShowAnimation"
Parameter name: id

"ShowAnimation" is the Target Control used in my "OpenAnimation" Extender. My current workaround is to replace the icon with a blank gif so it is not visible to the user, but is there a better way to do it? Like disabling an extender under a certain condition? Many thanks in advance!

Hi,

Are you hiding the element by setting Visible="false"? If so, this will prevent the element from being rendered on the page (and hence there will be no ID for the animation to target). Instead you should just set style="display: none;" or use the <HideAction Visible="false" /> animation.

Thanks,
Ted