Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting Property Application Wide for a User Control

Status
Not open for further replies.

bassguy

Programmer
Jun 21, 2001
336
0
0
US
Hello all,

I am Building an application that will have several forms with First Name Middle name and last Name on them so I decided to build a Control with the textboxes and the labels on it so I can just drop them where I want them.....
everything is cool .net rocks!!

My app is going to be used in a few different departments and the fun part is one of the departments NEVER wants the Middle name to show up on their forms.

I have changed the control so it can omit the middle name and shift the last name stuff correctly if a flag is tripped.

I want the same app and the same control to appear differently at run time depending on a Preference setting.
I am envisioning a Preferences somewhere in the SQL database in a table that the application admin would set either middle names on or middle names off.

Can I read the preference on application start up and somehow set the controls always to use the right configuration or do I have to set the Property every time the control is called?

thanks in advance

bassguy





 
Would you have anything in your database that would be seperating your users such as by logon id or something?
If so you could always include in the control that checked the users id by importing the system.enviroment and then checking against the db so basically when the control creates itself it will know what the users preferences are.

-Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top