PC Review


Reply
Thread Tools Rate Thread

Call Stack Error

 
 
Gunawan
Guest
Posts: n/a
 
      4th Jun 2007
Hi there,
I am using this code that I have found in the internet to generate excel
output.

Response.Clear();
Response.AddHeader("content-disposition",
"attachment;filename=kirim.xls");
Response.Charset = "";

// If you want the option to open the Excel file without saving than
// comment out the line below
// Response.Cache.SetCacheability(HttpCacheability.NoCache);

Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = "application/vnd.xls";

System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite =
new HtmlTextWriter(stringWrite);

//gv.RenderControl(htmlWrite);
this.RenderControl(htmlWrite);

Response.Write(stringWrite.ToString());
Response.End();


But I've got this error (Exception) bellow when Response.End() issue.
"Unable to evaluate expression because the code is optimized or a native
frame is on top of the call stack."

How to correct this issue?

Regards,
Gun



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Call Stack Available ? Neal Zimm Microsoft Excel Programming 5 11th Mar 2010 05:51 PM
error 28: out of stack space call function ina Microsoft Excel Programming 5 24th Apr 2006 07:26 PM
Warning 1684 CA2214 : Microsoft.Usage : 'RandomShade..ctor(Int32, Int32, Int32, Int32, Int32)' contains a call chain that results in a call to a virtual method defined by the class. Review the following call stack for unintended consequences: steve bull Microsoft C# .NET 4 7th Jul 2005 05:54 PM
walking the call stack from within a thread. Getting the parent call stack Jason Coyne Microsoft C# .NET 1 30th Mar 2005 10:30 PM
Re: Call Stack Jon Skeet [C# MVP] Microsoft Dot NET 0 17th Jun 2004 05:10 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:08 PM.