Today, I found a very deep hidden Bug. I checked the motion information on the Agenda page and closed it. When it was disabled, an error was reported, "the object is missing" _ doPostBack, at the beginning, I used the system's close button, that is, the X button, so I suspected it was a button problem, after checking the front-end code, we found that the missing object is GridSubject, that is, the URL of href in the parent page list is _ doPostBack ('............ ''') The first parameter is the same as the error page, so I found the cause, because the LinkButton is used for backend connection. I tried to determine whether the first parameter of PostBack exists, there is no way to do this (maybe there is, I did not find it). When I was looking for it, I found that MSDN recommended using the HyperLink proxy LinkButton, and found it very good, without the href attribute, there is no _ doPostBack. After testing, no error is found. Unfortunately, the style is no longer covered by the topic, and text-decoration: underline is used to solve the problem. It seems that the solution is complete. I am afraid that the page cannot be refreshed when it is closed. It is a test and cannot be refreshed.
Final Solution
Method:
The background code is in RowDataBound.
TableCell tc = e. Row. Cells [1];
Tc. SetDisplayText (14 );
E. Row. Cells [1]. Controls. Clear ();
LinkButton link = new LinkButton ();
Link. Text = tc. Text;
Link. ToolTip = tc. ToolTip;
Link. Style. Value = "text-decoration: underline ;";
E. Row. Cells [1]. Controls. Add (link );
Link. Attributes ["onclick"] =
String. Format (@ "javascript: PopSub ('{0}', this );"
, E. Row. Cells [0]. Text
);
Front-end code:
Function PopSub (SubID, obj ){
Var Dom = Pop ('~ /Before/SubjectInfo. ascx | SubjectID = '+ SubID, null,
'Dialogwidth: 648px; dialogHeight: 655px; center: yes; help: no; resizeble: yes; scroll: yes; status: no ',
'Topic information ');
// The Dom that saves the topic information is not empty.
Var hrefStr = "javascript :__ doPostBack ('mypan $ ucView_myPan $ GridSubject $ ctl03 $ ctl01 ','')";
If (IsNull (Dom ))
{
Obj. removeAttribute ("href ");
/* Because neither the cyclic waste time method nor the Try method can be solved, I used the href Method for removal.
// Waste of time
Var I = 0;
Var strin = "";
While (I <100000)
{
Strin = "UU" + I;
I ++
}
If (I = 100000)
{
//
}
Try
{
Obj. setAttribute ("href", hrefStr, true );
}
Catch (e ){}
Return false;
*/
}
Else
{
Obj. setAttribute ("href", hrefStr, true );
}
}