I am taking over and modernizing a model from another developer.
They had the following line in the settings.ascx page of the Module settings:
DotNetNuke.Entities.Portals.PortalSettings.UpdatePortalSetting(this.PortalId, "setting_name", tx_emailfrom.Text);
Which throws the following warning
Warning 'PortalSettings.UpdatePortalSetting(int, string, string)' is obsolete: 'Deprecated in DNN 5.0. Replaced by DataProvider.UpdatePortalSetting(Integer, String, String)'
So I changed the line to:
DotNetNuke.Data.DataProvider.UpdatePortalSetting( this.PortalId, "setting_name", tx_emailfrom.Text, UserId, "en-US");
As suggested but now I get the following error:
Error CS0120 An object reference is required for the non-static field, method, or property 'DataProvider.UpdatePortalSetting(int, string, string, int, string)'
What is the most up to date way to update the portal settings for DNN 7.3 and above. I can get the portal settings, just having trouble updating them.
Thanks in advance.