What is the best way to show different form fields for different user in ASP.NET?
Here is an example:
I have a form which has TextBox1, TextBox2, and TextBox3.
User A can only see TextBox1 and TextBox3.
User B can only see TextBox2 and TextBox3.
…
If there are a lot of users or form fields. It will be too tedious to code all the logic.
Is there any elegant way to achieve this without hand-coded logic?
You can use the LoginView Control. This is a small how-to.