日期:2014-05-18  浏览次数:20563 次

新手问题,高手帮忙
ajax调用xmlhttp.open( "GET ",   "WebForm2.aspx ",   true)的页面只有一句代码
Response.Write( "222 ");
但是xmlhttp.responseText返回了
【222
<!DOCTYPE   HTML   PUBLIC   "-//W3C//DTD   HTML   4.0   Transitional//EN "   > <HTML> <HEAD> <title> WebForm2 </title> <meta   name= "GENERATOR "   Content= "Microsoft   Visual   Studio   .NET   7.1 "> <meta   name= "CODE_LANGUAGE "   Content= "C# "> <meta   name= "vs_defaultClientScript "   content= "JavaScript "> <meta   name= "vs_targetSchema "   content= "http://schemas.microsoft.com/intellisense/ie5 "> </HEAD> <body   MS_POSITIONING= "GridLayout "> <form   name= "Form1 "   method= "post "   action= "WebForm2.aspx "   id= "Form1 "> <input   type= "hidden "   name= "__VIEWSTATE "   value= "dDwtNjU0MzcyMTk1Ozs+We1PBSx8xnLidHX4fwEcLek3NUo= "   /> </form> </body> </HTML> 】
有什么办法能不返回后面的HTML代码吗?

------解决方案--------------------
Response.Write( "222 ");
Response.End();
代码放到什么地方了,要放到Page_Load里面的