Click here to Skip to main content
16,004,924 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionDownloading a file without option to "open" file?? Pin
Goalie3522-Jan-07 5:29
Goalie3522-Jan-07 5:29 
AnswerRe: Downloading a file without option to "open" file?? Pin
minhpc_bk22-Jan-07 18:46
minhpc_bk22-Jan-07 18:46 
GeneralRe: Downloading a file without option to "open" file?? Pin
Goalie3524-Jan-07 4:31
Goalie3524-Jan-07 4:31 
QuestionHow do we call a function in code behind on a Div OnMouseOver Pin
www.Developerof.NET22-Jan-07 4:27
www.Developerof.NET22-Jan-07 4:27 
AnswerRe: How do we call a function in code behind on a Div OnMouseOver Pin
RichardGrimmer22-Jan-07 7:16
RichardGrimmer22-Jan-07 7:16 
QuestionCauses Validation Pin
Dayekh22-Jan-07 4:13
Dayekh22-Jan-07 4:13 
QuestionListing Folder Content and managing permissions Pin
just3ala222-Jan-07 4:04
just3ala222-Jan-07 4:04 
AnswerRe: Listing Folder Content and managing permissions Pin
Dayekh22-Jan-07 4:38
Dayekh22-Jan-07 4:38 
You can do it in the following way:

You have a User Table: (UserID, Username, UserGroupID)
You have a UserGroup Table: (UserGroupID, UserGroup Description)
You have a Permissions Table: (PermissionID,Description)
You have a Link Table between the Permissions and the UserGroup: (UserGroupPermissionID, PermissionID, UserGroupID)

Lets say you have only 2 user groups: General User and Admin.
A user can be SET to be any of the 2 UserGroups.
Lets say you have 2 Webforms. Webform1 is for General Users and Webform2 is for Admin. Consider each webform like a seperate permission. So lets say Webform1 is PermissionID 1 and Webform2 is PermissionID2:

Permission Table:
=================
Permission ID ... Description
1 ... Webform1
2 ... Webform2

UserGroup Table:
================
UserGroupID ... Description
1 ... General User
2 ... Admin

UserGroupPermission Table:
==========================
UserGroupPermissionID ... UserGroupID ... PermissionID
1 ... 1 ... 1
2 ... 2 ... 1
3 ... 2 ... 2


So you can see from that table that General User is allowed permission 1, whereas Admin is allowed permission 1 AND 2.

After you set the figures in the database, At the top of Webform1 code-behind page, you will need to query the database by passing the session UserID. Use a VIEW of the Permission link table and the usertable. If the UserID has permission "1", then allow him to see Webform1. If he doesn't, then redirect him/her.

Do the same for Webform2. If the user doesn't have Permission "2" in the database, he will simply be redirected away.

HOPE THIS HELPS! Smile | :)
GeneralRe: Listing Folder Content and managing permissions Pin
just3ala222-Jan-07 20:24
just3ala222-Jan-07 20:24 
GeneralRe: Listing Folder Content and managing permissions Pin
Dayekh22-Jan-07 22:37
Dayekh22-Jan-07 22:37 
GeneralRe: Listing Folder Content and managing permissions Pin
just3ala223-Jan-07 2:38
just3ala223-Jan-07 2:38 
GeneralRe: Listing Folder Content and managing permissions [modified] Pin
Dayekh23-Jan-07 3:03
Dayekh23-Jan-07 3:03 
GeneralRe: Listing Folder Content and managing permissions Pin
just3ala223-Jan-07 20:41
just3ala223-Jan-07 20:41 
GeneralRe: Listing Folder Content and managing permissions Pin
Dayekh23-Jan-07 23:00
Dayekh23-Jan-07 23:00 
Questionchart in report Pin
Mohammed Elkholy22-Jan-07 2:57
Mohammed Elkholy22-Jan-07 2:57 
QuestionHow to recover UI Issues when browser Page using MoZilla FireFox? Pin
pubududilena22-Jan-07 2:46
pubududilena22-Jan-07 2:46 
AnswerRe: How to recover UI Issues when browser Page using MoZilla FireFox? Pin
Paddy Boyd22-Jan-07 3:32
Paddy Boyd22-Jan-07 3:32 
AnswerRe: How to recover UI Issues when browser Page using MoZilla FireFox? Pin
Guffa22-Jan-07 4:33
Guffa22-Jan-07 4:33 
GeneralRe: How to recover UI Issues when browser Page using MoZilla FireFox? Pin
pubududilena22-Jan-07 4:48
pubududilena22-Jan-07 4:48 
GeneralRe: How to recover UI Issues when browser Page using MoZilla FireFox? Pin
Guffa22-Jan-07 9:37
Guffa22-Jan-07 9:37 
Questionsending state of one page on another page Pin
Member 374936322-Jan-07 2:18
Member 374936322-Jan-07 2:18 
AnswerRe: sending state of one page on another page Pin
Elina Blank22-Jan-07 5:08
sitebuilderElina Blank22-Jan-07 5:08 
AnswerRe: sending state of one page on another page Pin
RichardGrimmer22-Jan-07 7:17
RichardGrimmer22-Jan-07 7:17 
Questiondownload an exe file. Pin
srinandan..22-Jan-07 1:57
srinandan..22-Jan-07 1:57 
AnswerRe: download an exe file. Pin
Sebastien Lachance22-Jan-07 2:07
Sebastien Lachance22-Jan-07 2:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.