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  |  

$4.95 Windows Hosting at Webhost4life.com
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Webhost4Life - $4.95 Windows Hosting
 


  Sponsors  

Meet Our Sponsors

SmarterTools
The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
SourceGear - Tools for Developers
 


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.

 


DNN Outsourcing
50% more affordable services comparing to Western Europe and US: Custom DotNetNuke module development, skins, consulting, maintainence... Over 15.000 working hours of experience in custom DotNetNuke Solutions development, 8 years experience in outsourcing, excellent references!
www.dnnoutsourcing.com
Expressnet - DotNetNuke Hosting
Expressnet provide premium quality ASP.NET Web Hosting. We specialise in Windows based products including ASP.NET and Microsoft SQL Server. We offer fantastic value packages for DotNetNuke hosting. We also offer free asp.net web hosting
www.expressnet.com.au
Softech Development, Inc.
We help your business work smarter with DotNetNuke. Whether you need a new implementation, a custom module or skin for an existing implementation, or integration with your business processes, Softech has the experience and expertise to make it happen.
www.softechdevelopment.com

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