G
GTi
I have a aspx page and a code behind source.
I want to discard the aspx web form and create a new page from the code
behind source.
So I do:
string buf=null;
buf += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
buf += "<data>\n";
buf += "<action type='update' sid='1'/>\n";
buf += "</data>\n";
Page.Response.Clear();
Page.Response.Cache.SetCacheability(HttpCacheability.NoCache);
Page.Response.Expires = 0;
Page.Response.ContentType = "text/xml";
Page.Response.Write(buf);
Page.Response.BufferOutput = true;
Page.Response.End();
But then it gives me this error:
System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
I want to discard the aspx web form and create a new page from the code
behind source.
So I do:
string buf=null;
buf += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
buf += "<data>\n";
buf += "<action type='update' sid='1'/>\n";
buf += "</data>\n";
Page.Response.Clear();
Page.Response.Cache.SetCacheability(HttpCacheability.NoCache);
Page.Response.Expires = 0;
Page.Response.ContentType = "text/xml";
Page.Response.Write(buf);
Page.Response.BufferOutput = true;
Page.Response.End();
But then it gives me this error:
System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()