Hi,
I hve a problem with the DNNCountryEditControl
It throws Exception after every Page Postback (through a Button or something else)
Exception Details:
ExceptionGUID: bdb3acdf-f0a9-4d21-9cca-511c46082c5b
InnerException: Object reference not set to an instance of an object.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: DotNetNuke.UI.WebControls.EditControl.LoadPostData
StackTrace:
Message: DotNetNuke.Services.Exceptions.PageLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.UI.WebControls.EditControl.LoadPostData(String postDataKey, NameValueCollection postCollection) at System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---
And here is the Code I used (plain basic for the first time test, but it seems to be enough to produce the error)
*.ascx:
<tr>
<td><asp:Label ID="lblCountry" resourcekey="Country" runat="server" ></asp:Label></td>
<td>
<cc2:DNNCountryEditControl ID="lstCountry" runat="server" />
</td>
</tr>
*.ascx.cs:
lstCountry.Value = editUser.Profile.Country;
That's it, does someone know how to get around this, or better, how to fix this ?
Thanks a lot,
Marc
Someone else seems to have this problem before in erlier dnn version:
http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/111/threadid/288818/scope/posts/Default.aspx