I'm trying to leverage the supplied pop-up DNN calendar in a custom C# module, DNN 4.5
I have a test hyperlink and a textbox in a panel.
In my Page_Load, outside the Postback check I have
HyperLink hl = (HyperLink)Panel6.FindControl("hlADate");TextBox tx = (TextBox)Panel6.FindControl("testbox");Calendar.InvokePopupCal(tx);
This compiles fine but at runtime it throws an 'Object Reference Not Set To An Instance Of An Object exception:
System.TypeInitializationException was unhandled by user code
Message="The type initializer for 'DotNetNuke.Services.Cache.CachingProvider' threw an exception."
Source="DotNetNuke"
TypeName="DotNetNuke.Services.Cache.CachingProvider"
StackTrace:
at DotNetNuke.Services.Cache.CachingProvider.Instance()
at DotNetNuke.Common.Utilities.DataCache.GetCache(String CacheKey)
at DotNetNuke.Services.Localization.Localization.GetSupportedLocales()
at DotNetNuke.Services.Localization.Localization.GetResource(String ResourceFileRoot, PortalSettings objPortalSettings, String strLanguage)
at DotNetNuke.Services.Localization.Localization.GetString(String name, String ResourceFileRoot, PortalSettings objPortalSettings, String strLanguage, Boolean disableShowMissingKeys)
at DotNetNuke.Services.Localization.Localization.GetString(String name)
at DotNetNuke.Common.Utilities.Calendar.InvokePopupCal(TextBox Field)
at HKRMain.Page_Load(Object sender, EventArgs e) in c:\dev\dnn\hkr\timesheets2\HKRMain.ascx.cs:line 34
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Any clues as to what the problem is ??
TIA ...
hl.NavigateUrl = DotNetNuke.Common.Utilities.