Category DOTNETNUKE

Steps For Install DNN (Dotnet Nuke)

Category: DOTNETNUKE Comments: No comments

Steps For Install DNN (Dotnet Nuke)Read More

How to Create Profile Property through Coding in DNN

Category: DOTNETNUKE Comments: No comments

//Here ‘Level’ is the name of profile property

if (DotNetNuke.Entities.Profile.ProfileController.GetPropertyDefinitionByName(this.PortalId, “Level”) == null)
{
DotNetNuke.Entities.Profile.ProfileController.AddPropertyDefinition(
new DotNetNuke.Entities.Profile.ProfilePropertyDefinition(this.PortalId)
{
PropertyName = “Level”,
DataType = 10,
PropertyCategory=”Level”,
Length=100,
Visible=true
});
}

//Here txtLevel is the Textbox Control for assigning of this textbox value to Profile Property ‘Level’
oUser.Profile.SetProfileProperty(“Level”, txtLevel.Text);

Read More

Use of Module Setting Value in DotnetNuke (DNN) using C#

Category: DOTNETNUKE Comments: No comments

//Controls for configuration page to set the value DotNetNuke.Entities.Modules.ModuleController mctrl = new DotNetNuke.Entities.Modules.ModuleController(); Hashtable HT = new Hashtable(); TabInfo objtabinfo = new TabInfo(); TabController objtabcontroller = new TabController(); //Call this function on button to save module setting in cofiguration page private void ModuleConfigurationSetting() { HT = mctrl.GetModuleSettings(this.ModuleId); mctrl.UpdateModuleSetting(this.ModuleId, "Address", txtAdd.Text); mctrl.UpdateModuleSetting(this.ModuleId, "Tab_Name", ddlLoginPage.SelectedItem.Text); Response.Redirect(Globals.NavigateURL());Read More

Create Roles in DotnetNuke (DNN) using C#

Category: DOTNETNUKE Comments: No comments

RoleInfo objRoleInfodata = new RoleInfo();
RoleController objRoleControllerdata = new RoleController();

objRoleInfodata.Description = “Role Description”;
objRoleInfodata.IsPublic = false;
objRoleInfodata.AutoAssignment = false;
objRoleInfodata.PortalID = this.PortalId;
objRoleInfodata.RoleGroupID = -1;
objRoleInfodata.Status = DotNetNuke.Security.Roles.RoleStatus.Approved;
objRoleControllerdata.AddRole(objRoleInfodata);

Read More

Add Use Roles in DotnetNuke (DNN)

Category: DOTNETNUKE Comments: No comments

23Read More

Update User Roles in DotnetNuke (DNN)

Category: DOTNETNUKE Comments: No comments

RoleInfo objRoleInfo = new RoleInfo();
RoleController objRoleController = new RoleController();
objRoleInfo = objRoleController.GetRoleByName(PortalId, “Pass Roll Name”);
objRoleController.UpdateUserRole((“Pass Portal ID”, “Pass UserID”, “Pass Role Id”);
Ex:
objRoleController.UpdateUserRole(PortalId, UserId, objRoleInfo.RoleID);

Read More

Delete User from Roles in DotnetNuke (DNN)

Category: DOTNETNUKE Comments: No comments

RoleInfo objRoleInfo = new RoleInfo();
RoleController objRoleController = new RoleController();
objRoleInfo = objRoleController.GetRoleByName(PortalId, “Pass Roll Name”);
objRoleController.DeleteUserRole(“Pass Portal ID”, “Pass UserID”, “Pass Role Id”);
Ex:
objRoleController.DeleteUserRole(PortalId, UserId, objRoleInfo.RoleID);

Read More

Show User in which Roles in DotnetNuke (DNN)

Category: DOTNETNUKE Comments: No comments

23Read More

Get All portal Roles in DotnetNuke (DNN)

Category: DOTNETNUKE Comments: No comments

RoleController objRoleCont = new RoleController();
ArrayList objRoles = objRoleCont.GetPortalRoles(“Pass Portal Id”);
foreach (RoleInfo objRole in objRoles)
{
string RoleName=objRole.RoleName;
}

Read More

Use of Module Permission in DotnetNuke (DNN)

Category: DOTNETNUKE Comments: No comments

ModulePermissionCollection objCollCtrl = objMod.GetModulePermissionsCollectionByModuleID(this.ModuleId, this.TabId);
foreach (ModulePermissionInfo objper in objCollCtrl)
{

}

Read More