Different Role users display different pages and Role user pages

Source: Internet
Author: User

Different Role users display different pages and Role user pages

Http://forums.asp.net/t/2012341.aspx? Diffrent + login + views

Http://www.asp.net/web-forms/tutorials/security/roles/creating-and-managing-roles-cs


When users of different roles enter, the data displayed by the GridView is different. How can this problem be solved?

1. Since the user has divided roles, there should be a column that identifies the role in the database. This column is used for judging the Data Type displayed on the foreground.

2. if you want the two data columns displayed in the Gridview to be the same data table but different columns are displayed, you can check them all, then, the columns to be displayed are determined based on the user role on the foreground.

3. If the data displayed in the two Gridview tables is not the same, you can use two Gridview to switch the display.

In ASPNET (C #), different Panel controls are displayed on the same page based on the user's logon permissions.

User Permissions are also set in the table of the database. For example, the Administrator uses 1 as the table and the common user uses 0 as the table.
After the table is queried, select * from table name where uname = '"& uname &"' and pwd = '"& pwd &"'
Then judge if (user permission = 1) {} else {}

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.