Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Response.End() doesnResponse.End() doesn't stop processing script?
Previous
 
Next
New Post
5/12/2008 12:39 PM
 

Hi Richard,

No, it is still a mystery to me. I put a button on the page, and in the button_click event, I put the same code. Once I click the button and fire the event, it gave me the xml format I want. But the code doesn't work in the Page_Load event.

So still struggling...

Best regards.

 
New Post
5/12/2008 2:22 PM
 

Richard,

I tried to work around this issue and now it seems works while I still can't exactlly identify what causes this problem. I don't know if this will work for you or not, anyway, here is how I get it work in my case.

Instead of puting the code in Page_Load() event, I move it to the Page_Init() event, and I add an extra Response.End(); in the end.

 

{

   //Get data from database, put them in a RssChannel class 
    RssChannel rss = GetChannel(); 
   
    Response.Clear();
    Response.ClearContent();
    Response.ContentEncoding = System.Text.Encoding.UTF8;
    Response.ContentType = "application/xml";

    //Using XmlTextWriter to output the result  
    rss.Write(Response.OutputStream);
   
    //End processing of the script
    Response.End();

    //And extra ResponseEnd() which cuts off the rest of the output text. In my case, it cuts off everything after </rss> 
    Response.End();

}

private void Page_Init(Object sender, System.EventArgs e)

 
New Post
5/12/2008 3:41 PM
 

Cynthia wrote

Richard,

I tried to work around this issue and now it seems works while I still can't exactlly identify what causes this problem. I don't know if this will work for you or not, anyway, here is how I get it work in my case.

 

 

Ops, sorry, It should be

private void Page_Init(Object sender, System.EventArgs e)

{

  //Get data from database, put them in a RssChannel class 
    RssChannel rss = GetChannel(); 
   
    Response.Clear();
    Response.ClearContent();
    Response.ContentEncoding = System.Text.Encoding.UTF8;
    Response.ContentType = "application/xml";

}

 

    //Using XmlTextWriter to output the result  
    rss.Write(Response.OutputStream);
   
    //End processing of the script
    Response.End();

    //And extra ResponseEnd() which cuts off the rest of the output text. In my case, it cuts off everything after  
    Response.End();

Instead of puting the code in Page_Load() event, I move it to the Page_Init() event, and I add an extra Response.End(); in the end.

 

{

   //Get data from database, put them in a RssChannel class 
    RssChannel rss = GetChannel(); 
   
    Response.Clear();
    Response.ClearContent();
    Response.ContentEncoding = System.Text.Encoding.UTF8;
    Response.ContentType = "application/xml";

    //Using XmlTextWriter to output the result  
    rss.Write(Response.OutputStream);
   
    //End processing of the script
    Response.End();

    //And extra ResponseEnd() which cuts off the rest of the output text. In my case, it cuts off everything after  
    Response.End();

}

private void Page_Init(Object sender, System.EventArgs e)

 
New Post
2/21/2012 12:06 PM
 
I realize this is a relatively old post, but it still shows up for the search "DotNetNuke Response.End()" and the solutions here don't work (anymore) at least not for me.

I found that using a Response.Filter was a lot more reliable, and I wrote about it here:
http://blog.dmbcllc.com/2012/02/21/dotnetnuke-response-end-doesnt-end/
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Response.End() doesnResponse.End() doesn't stop processing script?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out