Some strange problems with the initial use of Asp.net

Source: Internet
Author: User

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 ......

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.