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:
我在我的asp.net MVC应用程序中使用ASP.NET客户端ajax控件工具包。我看到AjaxControlToolkit文件夹中有一个名为“AjaxControlToolkit.ModalPopup.ModalPopupBehavior.js”的.js文件。但是,我找不到任何关于如何使用它的例子。 [编辑] - 如上所述,我使用的是客户端,仅限脚本的控件工具包。对于那些不熟悉的人,这里是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.
AjaxControlToolkit-ScriptFilesOnly.zip包含脚本文件,CSS样式表和工具包使用的图片。如果您不想使用嵌入式资源并且更喜欢基于文件的模型,请使用此下载。
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
我还没有找到很多关于如何使用这个包含的脚本的资源。 CodePlex链接:http://www.codeplex.com/AjaxControlToolkit/Release/ProjectReleases.aspx
2 个解决方案
#1
2
Yestarday I had the same need to use the popup extender and here are the js files which you should include first.
Yestarday我有同样的需要使用弹出扩展器,这里是你应该首先包含的js文件。
<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:
下一步是从javascript创建PopupBehavior,如下所示:
$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.
如果你需要使用AjaxControlToolkit中的另一个控件,只需要脚本而没有asp的负担,这里有一个简单的方法来查找必要的包含js文件。转到此演示页面,查看页面源代码。在底部,您将看到如何创建控件。要查找此控件所需的包含文件,请选择CombineScriptsHandler.ashx并搜索“// START”。带有“// START”的每一行都显示一个包含在页面中的脚本。
#2
-1
Check out the AJAX Toolkit samples. There are live demos, walkthroughs and documentation.
查看AJAX Toolkit示例。有现场演示,演练和文档。
#1
2
Yestarday I had the same need to use the popup extender and here are the js files which you should include first.
Yestarday我有同样的需要使用弹出扩展器,这里是你应该首先包含的js文件。
<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:
下一步是从javascript创建PopupBehavior,如下所示:
$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.
如果你需要使用AjaxControlToolkit中的另一个控件,只需要脚本而没有asp的负担,这里有一个简单的方法来查找必要的包含js文件。转到此演示页面,查看页面源代码。在底部,您将看到如何创建控件。要查找此控件所需的包含文件,请选择CombineScriptsHandler.ashx并搜索“// START”。带有“// START”的每一行都显示一个包含在页面中的脚本。
#2
-1
Check out the AJAX Toolkit samples. There are live demos, walkthroughs and documentation.
查看AJAX Toolkit示例。有现场演示,演练和文档。