It took four hours to finally solve the problem.
1. Change the <asp: dropdownlist/> server control to an HTML server: <select id = "XXX" runat = "server"> </SELECT>.
2. Because runat = server is added, the operation is the same as the general dropdownlist. Bind can also be performed.
3. When the value is submitted, write as follows:
Classid = Request [xxx. uniqueid];
4. If it is in the user control, write as follows:
Htmldown = (System. Web. UI. htmlcontrols. htmlselect) This . Usercontrolblogclass1.findcontrol ( " Xxx " );
Classid = Request [htmldown. uniqueid];
Cause analysis:
Because a new item is dynamically added to the dropdownlist, the items in the dropdownlist do not match the items recorded in the hidden domain. Therefore, the "sending back or callback parameter is invalid" problem occurs.
It is also said on the Internet that the clientscript. registerforeventvalidation method registers items in the hidden domain through the protected override void render (system. Web. UI. htmltextwriter writer) event. I tried it many times and it was not successful.