asp.net中的表单模板 [英] form template in asp.net

查看:75
本文介绍了asp.net中的表单模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我想创建一个用户界面模板并根据客户要求使用它.
例如:
我有一个带有10个控件的网络表单
但客户要求不同.

客户端1希望表单上有3个控件,
客户端2需要5个控件和
客户端3想查看所有控件

我的另一个选择是为三种不同的解决方案创建三种不同的Web表单.如果有其他解决方案可用,请帮助我.

谢谢与问候,

Arvind Wanjari

Hi all,
I want to create a user interface template & use it according to the clients requirment.
For example:
I have a webform with 10 controls on it
but the clients requirments differ.

Client 1 wants 3 controls on the form,
client 2 wants 5 controls and
client 3 wants to see all controls

Another option I have is to create three different web forms for three diffrent solutions. If any other solution is available please help me.

Thanks & Regards,

Arvind Wanjari

推荐答案

您可以在web.config中定义所需的控件数量.在页面中,您可以默认将控件定义为visible = false.然后在页面的控件上循环(基于web.config中的数字)以定义可见的可见
You can define the number of control required in the web.config. In your page, you can define control to visible = false by default. And loop (base on the number in the web.config) on page''s control for define visible to true


将您的控件与以下数字(2的幂)相关联:
1,2,4,8,16,32,64,128,256,512

将用户与他们想要的控件总数相结合.

如果用户A要查看控件1、2和5,则总和为:19.

逐位加载时,比较用户总和和控制枚举.如果大于0,则显示控件,否则,不显示.

祝你好运.
Asssociate your controls with the following numbers (power of 2):
1,2,4,8,16,32,64,128,256,512

Associate you users with the sum of the numbers of controls they want.

if a user A wants to see controls one, two, and five the sum will be: 19.

When loading form bit-wise compare the users sum and the control enum. If it is more then 0, then display the control, else, don''t.

Good luck.


这篇关于asp.net中的表单模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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