DotNetNuke: login into portal programmatically

Written by domiSchenk. Posted in ASP.net, C#, DotNetNuke

My Requirement are to authenticate on a 3th party Database, grab the dnn user defined there and login into dotnetnuke.

For this I read a lot about how to login to DotNetNuke in codebehind, but every solution had to use AuthenticationLoginBase.OnUserAuthenticated().

PostBack does not work, submit buttons don’t work

Written by domiSchenk. Posted in ASP.net, C#, DotNetNuke

I came across the problem that my postback didn’t work as i wanted.
Well it did nothing to be exactly!

In short validators are the culprit! (they are normally not evil only if you don’t know how to use)

I have a validated a form with asp:RequiredFieldValidator this work like i wanted, but somehow another “form” of the site stopped working.

So I started debugging the JavaScript and came to the following result:

  • __doPostBack works
  • WebForm_DoPostBackWithOptions doesn’t work

??!!??%#@%&???!!

Auto save asp:Textbox settings in DotNetNuke (No more click on save!)

Written by domiSchenk. Posted in ASP.net, C#, DotNetNuke

How many time did you close your settings Popup(version 7.0+) and forgot to click on save?
I did this a lot of times, and when i was looking on code from Chris Hammond, i think he had the same problem ;-P

Most time of his code, I saw properties like this:

public int PageSize
{
	get
	{
		if (Settings.Contains("PageSize"))
			return Convert.ToInt32(Settings["PageSize"]);
		return 10;
	}
	set
	{
		var mc = new ModuleController();
		mc.UpdateModuleSetting(ModuleId, "PageSize", value.ToString());
	}
}

Disable overlay transparency in DotNetNuke 7.0+ edit-mode

Written by domiSchenk. Posted in ASP.net, CSS, DotNetNuke

Sometimes its just annoying/extremely irritating this transparency/blur in edit-mode.

To remove this just add following CSS code to your module.css or site Template.

.dnnEditState .DnnModule { 
    opacity: 1.0; 
}

DotNetNuke will add .dnnEditState to the body tag, and every Module does have this class .DnnModule.