我们可以跨不同的网页在单个用户控件上实现多种功能吗?如果我们可以怎么样?

问题描述:

我们可以在不同网页的单个用户控件上实现多种功能吗?如果我们可以如何?

Can we implement multiple functionality on a single user control across different web pages? If we can then how ?

尝试为控件设置不同的ID。对于具有相同特定功能的每个页面,请设置相同的ID。



- 功能1 - > ID1

- 功能2 - > ID2

...

- 功能N - > IDN



根据ID,处理每种功能的控制行为。



或者,如果ID不是您的正确选项,您可以设置自定义属性(属性)来识别控件行为,而不是ID。
Try to set different IDs for the control. For each page that have the same specific functionality, set the same ID.

- Functionality 1 -> ID1
- Functionality 2 -> ID2
...
- Functionality N -> IDN

Based on the ID, handle the control behavior, for each functionality.

Or, if the ID is not a proper option for you, instead of the ID, you can set a custom property (attribute) to identify the control behavior.