How do I use ModalPopup from the ASP.NET Script-Only ajax control toolkit?

I am using the ASP.NET Client-Side ajax control toolkit in my asp.net MVC application. I see that there is a .js file named "AjaxControlToolkit.ModalPopup.ModalPopupBehavior.js" in the AjaxControlToolkit folder. However, I cannot find any examples on how to use it. [Edit] - As mentioned, I am using the Client-side, Script-only control toolkit. For those unfamiliar, here is the description from CodePlex:

AjaxControlToolkit-ScriptFilesOnly.zip contains script files, CSS style sheets and pictures used by the toolkit. Use this download if you don't want to use embedded resources and prefer a file-based model.

I have not been able to find many resources on how to use some of the scripts included with this. CodePlex link: http://www.codeplex.com/AjaxControlToolkit/Release/ProjectReleases.aspx

Answers


Yestarday I had the same need to use the popup extender and here are the js files which you should include first.

<script src="javascripts/MicrosoftAjax.js" type="text/javascript" ></script>
<script src="javascripts/AjaxControlToolkit/AjaxControlToolkit.Compat.Timer.Timer.js" type="text/javascript"></script>
<script src="javascripts/AjaxControlToolkit/AjaxControlToolkit.Common.Common.js" type="text/javascript"></script>
<script src="javascripts/AjaxControlToolkit/AjaxControlToolkit.ExtenderBase.BaseScripts.js" type="text/javascript"></script>
<script src="javascripts/AjaxControlToolkit/AjaxControlToolkit.Animation.Animations.js" type="text/javascript"></script>
<script src="javascripts/AjaxControlToolkit/AjaxControlToolkit.DropShadow.DropShadowBehavior.js" type="text/javascript"></script>
<script src="javascripts/AjaxControlToolkit/AjaxControlToolkit.DynamicPopulate.DynamicPopulateBehavior.js" type="text/javascript"></script>
<script src="javascripts/AjaxControlToolkit/AjaxControlToolkit.PopupExtender.PopupBehavior.js" type="text/javascript"></script>

The next step is to create the PopupBehavior from javascript like that:

$create(AjaxControlToolkit.PopupControlBehavior, {"PopupControlID":"div_to_popup","Position":3}, null, null, $get("textbox_input_id"));

If you need to use another control from the AjaxControlToolkit with scripts only without the burden of asp, here is one easy way to find the necessary include js files. Go to its demo page here and look at the source of the page. At the bottom you will see how to create the control. To find the include files needed for this control select CombineScriptsHandler.ashx and search for "//START". Every line with "//START" shows a script which is included in the page.


Need Your Help

Java Raytracer: Multithreaded CPU rendering of different parts of the screen per thread

java rendering real-time raytracing

So I've been working on a simple real-time raytracer using purely Java and now that I have most stuff working correctly from diffuse lighting and specular highlights to ray reflections and refracti...

Expected expression before '@' token main.m

ios cocos2d-iphone admob adwhirl

I added a GoogleAdMobAdsSdkiOS-6.1.4 SDK to my cocos2d app in order to integrate AdWhirl. When I added this Google SDK I got the following error:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.