How to use ModalPopup from ASP.NET Script -Only ajax toolkit?

I am using ASP.NET Client-Side ajax toolkit control in my MVC asp.net application. I can see that there is a .js file named "AjaxControlToolkit.ModalPopup.ModalPopupBehavior.js" in the AjaxControlToolkit folder. However, I cannot find examples on how to use it.

[Edit] - As mentioned, I am using Client-side, Script is only control toolkit. For those unfamiliar, here's a description from CodePlex:

AjaxControlToolkit-ScriptFilesOnly.zip contains script files, CSS style sheets and images used by Toolkit. Use this download if you don't want to use inline resources and prefer the file model.

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

0


source to share


2 answers


Yestarday I had the same need for using a popup expander and here are the js files 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 a PopupBehavior from javascript like this:



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

      

If you need to use a different control from AjaxControlToolkit with scripts only without asp load, here is one easy way to find the required js include files. Go to your demo page here and look at the source of the page. Below you will see how to create a control. To find the included files required for this control, select CombineScriptsHandler.ashx and search for "// START". Each line with "// START" shows the script that is included in the page.

+2


source


Check out the AJAX Toolkit samples . There are live demos, walkthroughs, and documentation.



-1


source







All Articles