我们可以跨不同的网页在单个用户控件上实现多种功能吗?如果我们可以怎么样? [英] Can we implement multiple functionality on a single user control across different web pages? If we can then how ?

查看:54
本文介绍了我们可以跨不同的网页在单个用户控件上实现多种功能吗?如果我们可以怎么样?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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.


这篇关于我们可以跨不同的网页在单个用户控件上实现多种功能吗?如果我们可以怎么样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆