Thursday, April 10, 2008

Strange issue with deployment of custom editform.aspx

I had the same issue (see below) a couple of days ago and spent a couple of hours on finding the reason for it

Here the whole thread with the detailed Solution Description:

http://forums.microsoft.com/technet/ShowPost.aspx?siteid=17&postid=3154005




Problem:
Input string was not in a correct format. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.FormatException: Input string was not in a correct format.Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [FormatException: Input string was not in a correct format.] System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +2755599 System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +112 System.Convert.ToInt32(String value, IFormatProvider provider) +44 Microsoft.SharePoint.WebControls.ItemHiddenVersion.OnLoad(EventArgs e) +253 System.Web.UI.Control.LoadRecursive() +47 System.Web.UI.Control.LoadRecursive() +131 System.Web.UI.Control.LoadRecursive() +131 System.Web.UI.Control.LoadRecursive() +131 System.Web.UI.Control.LoadRecursive() +131 System.Web.UI.Control.LoadRecursive() +131 System.Web.UI.Control.LoadRecursive() +131 System.Web.UI.Control.LoadRecursive() +131 System.Web.UI.Control.LoadRecursive() +131 System.Web.UI.Control.LoadRecursive() +131 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1436

Solution:
Instead of setting the Zone-Visibility to false, add a DIV around your zone and just hide the DIV with setting style="visibility: hidden". This way round the necessary information will be rendered to the page but not shown to the user. That's it - fixed!

No comments: