Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
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
Posted
Updated 25-Nov-10 2:43am
v2

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
 
Share this answer
 
v2
Comments
Arvind Wanjari 25-Nov-10 8:58am    
but that time also all control render in page this cause performance
Sebastien T. 25-Nov-10 9:08am    
For 10 control, I think that the perfomance is not very impact with this method. The loop must be in the page_load and in the test !IsPostBack. After if you page is "heavy", the best way is probably create different web page
Dalek Dave 25-Nov-10 9:24am    
Good Answer.
Sebastien T. 25-Nov-10 9:57am    
Thanks
[no name] 25-Nov-10 23:32pm    
Controls with visible =false will not be rendered
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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900