0

I have around 11 section in my tab every section have around 50 question, then total all question will be around 550 question. There two users will access this tab, one user will see all question and they will submit details of all sections and another user will see some questions around 200 question from each section.

My question is how to hide the questions to another user will have some questions access and i am user asp.net control in all 11 sections but i am not getting any best approach to hide the question to another user.

below is my sample tab section

enter image description here

When I click Case 1 section then case1.aspx page will appear with 50 question to full access user and another user will have 20 question access only in case1. and this is not jquery tabs using user control doing this. My question is how to hide 30 question for another user in case1 section, i am planing to used asp panel to hide 30 questions in case similarly in other sections. This is correct way to hide question. any other simple trick also there?

Because in case 1 section another user can see question number 1 to 10 and 40 to 50 and total 20 question. If i will used asp panel then question number sequence problem also coming to me like 1,2,3,4,5,6,7,8,9,10,40,41,42...50. And the sequence should be 1,2, ....20. Please tell me i have to use asp.net panels or not, if not please tell be best trick.

Mr doubt
  • 51
  • 1
  • 10
  • 42
  • May be you should consider creating separate pages for different type of users and then display the appropriate questions under each section based on the type of logged-in user. This approach will prevent cluttering the code of one page with many checks based on user. – Mohsin Mehmood Jun 22 '19 at 18:25
  • Since you mentioned `User`, I will assume that they are logged in. which means you know who has full access and who doesn't, So I will suggest that you use `Random` number generation for any type of user and pull only specific number of question from your database. see how to use random number here https://stackoverflow.com/questions/2706500/how-do-i-generate-a-random-int-number – Bosco Jun 22 '19 at 19:22

1 Answers1

0

Hiding the answers is not a proper solution because a user could see the data by just removing the display none property in HTML.

you should remove the desired questions from the data source you are passing to control after checking the user permission whether to show these questions or not

This could be one solution.

saqib abbas
  • 71
  • 1
  • 3