Recently, I have been studying. net,
When you view the source code of an OA system, you will find this problem,
In clientlistview. aspxCode
< ASP: button ID = "Btn_addclient" Runat = "Server" Cssclass = "Redbuttoncss" Text = "Add customer" > </ ASP: button >
< ASP: button ID = "Btn_addlinkman" Runat = "Server" Cssclass = "Redbuttoncss" Text = "Add contact" > </ ASP: button >
< ASP: button ID = "Btn_addcontact" Runat = "Server" Cssclass = "Redbuttoncss" Text = "Add contact" > </ ASP: button >
The code in the corresponding clientlistview. aspx. CS is
Private Void Btn_addlinkman_click ( Object Sender, system. eventargs E)
{
// Traverse the DataGrid to get the ID of the last checkbox selected
String Selectedstring = Getselecteditemid ( " Cbx1 " );
String [] Arrselectedstring = Selectedstring. Split ( ' , ' );
String ID = Arrselectedstring [arrselectedstring. getlength ( 0 ) - 1 ];
Response. Write ( " <SCRIPT> javascript: window. Open ('linkman. aspx? Clientid = " + ID + " & From = clientlist ',' _ blank '); </SCRIPT> " );
}
Private Void Btn_addcontact_click ( Object Sender, system. eventargs E)
{
// Traverse the DataGrid to get the ID of the last checkbox selected
String Selectedstring = Getselecteditemid ( " Cbx1 " );
String [] Arrselectedstring = Selectedstring. Split ( ' , ' );
String ID = Arrselectedstring [arrselectedstring. getlength ( 0 ) - 1 ];
Response. Write ( " <SCRIPT> javascript: window. Open ('clientcontact _ thisweek. aspx? Clientid = " + ID + " ',' _ Blank '); </SCRIPT> " );
}
Private Void Btn_addclient_click ( Object Sender, system. eventargs E)
{
Response. Write ("<SCRIPT> javascript: window. Open ('client. aspx ',' _ blank '); </SCRIPT>");
}
During the first trial, the events of "add customer", "add contact", and "add contact" cannot be triggered normally,
Win2000sp4/win2003 is used on the server, and windows2000sp4/2003/XP SP2 IE6/ie5.5 is used on the client respectively. Neither of them can be triggered normally,
There was no exception when I first looked at the code. The problem still could not be solved after the solution was re-compiled.
Then I tried to insert a breakpoint before this sentence --> debug --> it turned out to be normal. It was also normal to remove the breakpoint.
Response. Write ("<SCRIPT> javascript: window. Open ('linkman. aspx? Clientid ="+ID+"& From = clientlist ',' _ blank '); </SCRIPT>");
I set the breakpoint --> debug --> abnormal for the other two buttons at the same time,
Only one breakpoint can be set at a time --> debug --> normal --> set the next breakpoint --> debug ......
This is a strange phenomenon. How can this happen?
My debugging environment: windowsxpsp2,. net1.1, vs2003
Confused ......