Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Security and Web Forms
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
VB.NET 1.1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01171423
Message ID:
01171504
Views:
7
>How do I block usage on a form level depending on your role?

This is how I've done it:
mmUser boUser = new mmUser();
mmRole boRoles = new mmRole();
DataSet dsRoles = boRoles.GetUserRoles(this.SecurityUserPk);
bool AllowAccess = false;
foreach (DataRow dr in dsRoles.Tables[0].Rows)
{
	if (dr["description"].ToString() == "Administrator")
	{
		AllowAccess = true;
	}
}
Rip Ryness
International Falls, MN
Previous
Reply
Map
View

Click here to load this message in the networking platform