I got 2 questions which are tightly coupled here.

When you look into the documentation on msdn about creating extender controls they preach that the new control must inherit from ExtenderControl which is part of the Asp.net Ajax Library reference:read more about it but on reading more about extender controls i also found this which states that control must inherit from ExtenderControlBase which is part of AjaxControlToolkit. Which on thinking doesn't make sense, Toolkit is already extender control collection and

  1. why should my new control inherit from another base which actually inherits from Microsoft Ajax Library this also makes client who use my control to also include Toolkit dll whether they like it or not.

  2. Also the manner properties set in both the reference i gave above is contrasting. Msdn does it with get/set methods but Toolkit docs prefer GetValue, SetValue. Which am to follow now.

3.This is not really a question though, but How do you maintain class library of controls mine is setup right now with no arrangement at all. Do you arrange them based on folders? Do you put them based on their function.

有帮助吗?

解决方案

1) ExtenderControl is part of the .NET framework and is a abstract class to extend from to create your own extender controls using your own implementation.

ExtenderControlBase is from the external AjaxControlToolkit library which extends ExtenderControl to provide a more complete implementation that is further used within the library, and that can be used by others. It saves effort in building your own from scratch as you can leverage the implementation already in place.

2) Use whichever get/set syntax matches the reference you decide to use.

3) The convention is usually to use a folder structure that matches namespaces, grouped in a logical manner. Based on function sounds like a sensible way.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top