我试图对伙伴关系实行不可行的控制。 正在处理中的网络网页。 为此,我通过了以下解决办法:here,砍下了DOM树,分解了所有儿童控制。 这对我试图拆解的屏幕的许多部分来说都是罚款的,但试图拆开一些表层控制会产生以下错误:
Server Error in / Application.
--------------------------------------------------------------------------------
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) +7471479
System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt) +115
System.Double.Parse(String s, NumberStyles style, NumberFormatInfo info) +192
System.Double.Parse(String s, IFormatProvider provider) +25
ComponentArt.Web.UI.NumberInput.set_Value(Nullable`1 value) +81
ComponentArt.Web.UI.NumberInput.LoadViewState(Object savedState) +255
System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +183
System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134
System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221
System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134
System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221
System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134
System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221
System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134
System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221
System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState) +134
System.Web.UI.Control.LoadViewStateRecursive(Object savedState) +221
System.Web.UI.Page.LoadAllState() +312
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1661
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3625; ASP.NET Version:2.0.50727.3618
这在应用法中都没有,因此我不知道怎么做。 是否有任何人知道如何缩小问题的根源,或我应该开始研究什么地方?
或者,是否有更好的办法消除控制集团?
我也尝试了所建议的方法:here,用于拆卸控制,为此设立了一个小组,并安排了false
,但似乎没有做任何事情。
EDIT:根据要求,这里是旨在取消控制范围的 Java:
function disableChildElements(objId)
{
var theObject = document.getElementById(objId);
var level = 0;
TraverseDOM(theObject, level, disableElement);
}
function TraverseDOM(obj, lvl, actionFunc)
{
for (var i=0; i<obj.childNodes.length; i++)
{
var childObj = obj.childNodes[i];
if (childObj.tagName)
{
actionFunc(childObj);
}
TraverseDOM(childObj, lvl + 1, actionFunc);
}
}
function disableElement(obj)
{
obj.disabled = true;
}
function DisableControls()
{
disableChildElements(castVariablesTable.id);
disableChildElements(oldGradeTable.id);
oldGradePanel.enabled=false;
}
<代码>可分解<>功能代码/代码>第一行有效;第二行造成错误。 把第2行改为第3行,以尝试替代方法,是没有意义的。
The cast variables table in the ASP starts like this...
<table id="castVariablesTable" class="normalTable">
<tr>
<td>
<label class="normalText">Number of strands</label>
</td>
<td>
<span class="normalInput">
<MixedZone:NumberInput runat="server"
ID="niNumberOfStrands"
MaxLength="1"
Step="1"
Increment="1"
MaxValue="6"
MinValue="1"
NumberType="Number"
DecimalDigits="0">
</MixedZone:NumberInput>
</span>
等等。
造成这一问题的表格过于庞大,但含有同样的缺陷;我没有能够控制造成困难的特定控制。