ChrisHammond / DNNTemplates

Christoc's DotNetNuke Extension Development templates for Visual Studio
http://www.christoc.com/Products/DNN-Development-Templates
Other
97 stars 38 forks source link

Only first two custom settings save #74

Closed Afacts closed 1 year ago

Afacts commented 2 years ago

This is a strange issue that I can't figure out. The first two settings in settings.ascx.cs save but none after that. Below, NameOne and EmailOne save but not NameTwo and EmailTwo. Even looking directly in the DB there are no entries being addded to the ModuleSettings table for NameTwo and EmailTwo.

Please advise. Not quite sure what I'm doing wrong. I'm following the pattern in the template.

public override void UpdateSettings() { try { var modules = new ModuleController();

            modules.UpdateModuleSetting(ModuleId, "NameOne", txtName1.Text);
            modules.UpdateModuleSetting(ModuleId, "EmailOne", txtEmail1.Text);

            modules.UpdateModuleSetting(ModuleId, "NameTwo", txtName2.Text);
            modules.UpdateModuleSetting(ModuleId, "EmailTwo", txtEmail2.Text);
      }

}

Afacts commented 2 years ago

Hi, I'm wondering if you have any insights here. I don't doubt that I'm doing something wrong but I am pretty much doing it the same way that its done in the template. Are you able to save more than the first two?

ChrisHammond commented 2 years ago

I haven't had a chance to test this out yet. I will look at trying to reproduce it this week if I can

Afacts commented 2 years ago

Thanks so much for checking into it ...

ChrisHammond commented 2 years ago

Sorry for the delays, I finally got to testing this. I was able to setup 4 unique module settings and save them without problem. (using the C# DAL2 module template)

image

Any chance you figured out what problem you were running into that caused this?