Showing posts with label hide. Show all posts
Showing posts with label hide. Show all posts

Wednesday, March 28, 2012

UpdateProgress: Hide Page During Asynchronous Postbacks

I did a quick search, but I wasn't able to turn anything up. While an asynchronous postback is in progress, I'd like to hide the primary contents of the page and displayonly the contents of UpdateProgress. After the processing has completed, the controls should be made viewable again.

Is this possible?

Thank you,

--
Sean

Just in case anybody else comes across this, I got it to work by writing some custom JavaScript to hide a predetermined div. That way, when the UpdateProgress control is displayed, the screen is otherwise blank.

Wednesday, March 21, 2012

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