c# - "ASP.NET AJAX Server Control"和 "ASP.NET Server Control"项目类型有什么区别?

标签 c# asp.net custom-server-controls

<分区>

“ASP.NET AJAX 服务器控件”和“ASP.NET 服务器控件”项目类型有什么区别?

一种项目类型比另一种项目类型有优势吗?

是否有一些事情可以在一个中完成而另一个不能完成?

提前致谢。

编辑: 我找到了这个链接:http://www.codeproject.com/Articles/22384/ASP-NET-AJAX-Controls-and-Extenders

这是该链接的引述,我认为它回答了我的问题:

At first glance, it would seem that the ASP.NET Server Control differs from the other two controls in that it doesn't support AJAX. This isn't completely true, however, and in the first part of this tutorial, I will demonstrate just how far you can go in developing an AJAX-enabled control based on the Server Control alone. While the ASP.NET Server Control does not provide direct access to AJAX scripts, it can implement AJAX scripts encapsulated in other controls such as the UpdatePanel, or the AJAX Extensions Timer Control, to provide AJAX functionality. For control developers who are not all that keen on delving into the intricacies and pitfalls of JavaScript, the Server Control offers an excellent and clean development path.

The AJAX Server Control and the AJAX Server Control Extender differ from the regular ASP.NET Server Control by coupling themselves with JavaScript files, and allowing mapping between properties of a control class and properties of a JavaScript class. When you need functionality not provided by other AJAX Server controls, or simply want to customize your control using client-side script in order to avoid the ASP.NET control life-cycle, then this is the best option.

编辑 2:我刚刚看到 Aghilas Yakoub 的回答有相同的链接 :)

最佳答案

在项目方面,它们是相同的。唯一的区别是默认创建的控件的初始样板代码。您可以完全自由地将 Ajax 控件添加到简单的服务器控件项目,反之亦然。

关于c# - "ASP.NET AJAX Server Control"和 "ASP.NET Server Control"项目类型有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12411683/

相关文章:

c# - 使用 VS 2010 创建 ASP.NET 复合自定义服务器控件并将 JQuery (CDN) 作为嵌入式资源?

c# - 为什么我可以在 C# 中执行此操作?(带有 () 的公共(public)类)

c# - SqlException '?' 附近的语法不正确

c# - web.config 转换未应用于发布或构建安装包

asp.net - 有条件地隐藏 Gridview 中的 CommandField 或 ButtonField

asp.net - 在父级中禁用时,如何为子级自定义控件启用 ViewState?

asp.net - 如何使用 StylePlaceHolder 和 Style 控件控制 ASP.NET 主题中的样式表

c# - 如何使用 Linq2Sql 构建我的服务/存储库代码!

c# - selenium webdriver 单击 javascript 链接

c# - 在csproj文件中配置XamlRuntime和DefaultXamlRuntime意义