473,414 Members | 1,937 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

q; not performed during debug

private void DownloadPDF(string fPath)
{
Response.Clear();
Response.ContentType = "Application/pdf";
Response.WriteFile(fPath);
Response.End();
}
private void Show(string file)
{
DownloadPDF(file);

int i =1; // not performed during debug
i=i+1;
}

While I am debugging the code above I noticed the breakpoint on i=i+1 is
never hit. What is problem and how I can resole this? After downloading the
file I need to perform some operations and display something on the user
interface.

Sep 25 '06 #1
3 1248
You are calling Response.End in DownloadPDF. That ends the current request.
Those 2 lines of code should never be run - both in debug and release. So
everything is behaving as expected given the code you are running.

"JIM.H." <JI**@discussions.microsoft.comwrote in message
news:BF**********************************@microsof t.com...
private void DownloadPDF(string fPath)
{
Response.Clear();
Response.ContentType = "Application/pdf";
Response.WriteFile(fPath);
Response.End();
}
private void Show(string file)
{
DownloadPDF(file);

int i =1; // not performed during debug
i=i+1;
}

While I am debugging the code above I noticed the breakpoint on i=i+1 is
never hit. What is problem and how I can resole this? After downloading
the
file I need to perform some operations and display something on the user
interface.



Sep 25 '06 #2
Response.End() causes an immdediate exit (by killing the current thread)
don't call it until you've done you additional work.

-- bruce (sqlwork.com)

"JIM.H." <JI**@discussions.microsoft.comwrote in message
news:BF**********************************@microsof t.com...
private void DownloadPDF(string fPath)
{
Response.Clear();
Response.ContentType = "Application/pdf";
Response.WriteFile(fPath);
Response.End();
}
private void Show(string file)
{
DownloadPDF(file);

int i =1; // not performed during debug
i=i+1;
}

While I am debugging the code above I noticed the breakpoint on i=i+1 is
never hit. What is problem and how I can resole this? After downloading
the
file I need to perform some operations and display something on the user
interface.



Sep 25 '06 #3
Ok. Thanks for the reply. I am doing this.MyLabel.Text=”Test”; just before
Response.End() and this does not have impact on the screen. What is problem
there?

"Marina Levit [MVP]" wrote:
You are calling Response.End in DownloadPDF. That ends the current request.
Those 2 lines of code should never be run - both in debug and release. So
everything is behaving as expected given the code you are running.

"JIM.H." <JI**@discussions.microsoft.comwrote in message
news:BF**********************************@microsof t.com...
private void DownloadPDF(string fPath)
{
Response.Clear();
Response.ContentType = "Application/pdf";
Response.WriteFile(fPath);
Response.End();
}
private void Show(string file)
{
DownloadPDF(file);

int i =1; // not performed during debug
i=i+1;
}

While I am debugging the code above I noticed the breakpoint on i=i+1 is
never hit. What is problem and how I can resole this? After downloading
the
file I need to perform some operations and display something on the user
interface.



Sep 26 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Tony Wright | last post by:
Hi, I am having a problem installing an msi for a web site. The error message I am getting is: "The specified path 'http://mipdev05/features/Fas2' is unavailable. The Internet Information...
3
by: junaidnaseer | last post by:
Is it possible to actually count the number of addition or multiplication operations performed in a program during runtime . I know of a program that does this simply by looking through the code...
9
by: junaidnaseer | last post by:
ok I know I posted this question previously and then I got a reply and I realized that I had asked a really dumb question but now I realize that my question wasn't that dumb at all ! I had asked...
1
by: Ryan | last post by:
Is there any way to view what data is populating my DataSet tables during debugging? Thanks, Ryan
5
by: B. | last post by:
I know there is similar post few years back, but it didn't help solving my problem: We have a big project. Our legacy code is ported to VC++ 2005 recently. We have new feature written in C#.Net....
2
by: san | last post by:
Hello, i am in great trouble. I want to revert back to original state of database before i performed restore database on my sql server 2K Database. Accidently i didn't take backup of my Database...
2
by: Andreas Mueller | last post by:
Hi All, I'm trying to show a context menu during a drag drop operation similar to the windows explorers right click drag and drop behavior (A full working sample is at the end of the post): ...
8
by: Brian | last post by:
What's the best way to debug code that is being run during garbage collection? We are getting AccessViolationExceptions that seem to be happening during garbage collection. But when it hits the...
1
by: andwan0 | last post by:
I have a legacy classic ASP website with lots of classic AJAX (many ASP files specially made for processing AJAX requests). We are slowly migrating the website to ASP.NET 2.0 and developing under...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.