Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Webhost4Life - $4.95 Windows Hosting
 


  Sponsors  

Meet Our Sponsors

AspDotNetStoreFront - E-Commerce by Design - The Leading ASP.NET shopping cart platform for developers!
Click here to go to dev.live.com for Windows Live developer resources
SteadyRain
DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Response.End() doesn't stop processing script?
Previous Previous
 
Next Next
New Post 5/12/2008 9:39 AM
User is offline Cynthia
9 posts
10th Ranked


Re: Response.End() doesn't stop processing script? 

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 11:22 AM
User is offline Cynthia
9 posts
10th Ranked


Re: Response.End() doesn't stop processing script? 

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 12:41 PM
User is offline Cynthia
9 posts
10th Ranked


Re: Response.End() doesn't stop processing script? 

 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)

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Response.End() doesn't stop processing script?
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Where Every Home is an Investment
Where Every Home is an Investment
www.nestbrokers.com
Faculty of Graduate and Postdoctoral Studies
At the graduate level, the University of Ottawa offers more than 180 graduate certificates, master's degrees and PhDs, as well as interdisciplinary programs such as Women's Studies and Canadian Studies. Many postdoctoral opportunities are available in both the sciences and the humanities. For further information, please consult the site of the Faculty of Graduate and Postdoctoral Studies.
www.grad.uottawa.ca
Vekkin Solutions
Vekkin Solutions provides complete website solutions and custom module development to churches and small businesses.
www.vekkin.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP