I expected to type \n into the ConfirmText property of the AJAX Control Toolkit’s ConfirmButtonExtender and get a new line.
This doesn’t work, but you can use this character code:
Specifically, ampersand pound ten semicolon.
I expected to type \n into the ConfirmText property of the AJAX Control Toolkit’s ConfirmButtonExtender and get a new line.
This doesn’t work, but you can use this character code:
Specifically, ampersand pound ten semicolon.
Controls inside an ASP.NET UpdatePanel cannot be bound to jQuery events after a partial postback. Here are some tips using pageLoad():
To set the Watermark Text of a TextBoxWatermarkExtender in the AJAX Control Toolkit, use the following code:
var behavior = $find('<%= TextBoxWatermarkExtender1.ClientID %>');
behavior.clearText();
behavior.set_Text('Hello World!');
behavior.initialize();
It took me a while to find that I needed to call the Initialize() function before the Watermark Text would get updated.
Update September 25, 2012
It appears that different versions of the AJAX Control Toolkit have different public methods.
var behavior = document.getElementById("<%= TextBox1.ClientID%>").AjaxControlToolkitTextBoxWrapper;
behavior.set_Watermark('');
Some of the best resources for the animation framework that comes with the ASP.Net AJAX Control Toolkit can be found at the live toolkit site at this Sample Site. I often look at the Animation Reference section of this site.
While adding animations to ASP.Net pages, it is sometimes necessary to call animations directly from Javascript code. This can be achieved relatively easily using the great instructions at this MSDN blog.
Combined with the Animation Reference on http://asp.net/ajax website, any animation can be called directly from Javascript. If you can’t use the <OnLoad> animation event handler in the AnimationExtender control, one way to play animations on the page load is to use ClientScriptManager.RegisterStartupScript to create a function with the animation code, and call that function on the next line.
Page.ClientScript.RegisterStartupScript(Me.GetType, “PlayLoadAnimation”, “function playNotificationAnimation(){ AjaxControlToolkit.Animation.ColorAnimation.play($get(“”divNotification””) , 1 , 30 , “”style”” , “”backgroundColor”” , “”#181840″” , “”#E9E8FF””); }”, True)
Page.ClientScript.RegisterStartupScript(Me.GetType, “LoadAnimationFunction”, “playNotificationAnimation();”, True)
Happy Animating!
Zachary Lyons