The customer reported that they could not log on after modifying their information.
So I tracked the page on which the customer modified the data and found that some controls were disabled to restrict the user from modifying some system options.
Check againCodeNo obvious problems were found, so code execution was tracked.
Finally, it is found that a select control returns an incorrect value: select1.selectedvalue is always the value of the first item.
Then, we track the value assignment and find that the value of select1 has been selected with the correct options, and the results displayed on the page are also normal.
Painful. I cannot figure it out for a long time.
The last thing I remember is that when the disabled control is removed, the browser will not submit its value to the server when it is submitted: After the select1 control is disavisible, and when it is PostBack, the control cannot obtain this value, so the first item is used as the default value. This bug is caused by disabled.
For ease of use, directly write a script to solve this problem:
<Form onsubmit = "Return check (this)">
<SCRIPT>
Function check (FRM)
{
VaR ncount = FRM. length;
For (VAR I = 0; I <ncount; I ++)
{
FRM [I]. Disabled = false;
}
Return true;
}
</SCRIPT>