【发布时间】:2014-05-09 03:33:41
【问题描述】:
基于this link我创建了一个Role,但出现如下错误:
命名空间RoleExists在命名空间testproject中不存在。
角色和我的代码如下所示:
namespace testproject.Roles
{
public partial class ManageRoles : System.Web.UI.Page
{
protected void CreateRoleButton_Click(object sender, EventArgs e)
{
string newRoleName = RoleName.Text.Trim();
if (!Roles.RoleExists(newRoleName)) // Create the role
Roles.CreateRole(newRoleName);
RoleName.Text = string.Empty;
}
}
}
【问题讨论】:
标签: c# asp.net namespaces