|
Forums » .NET » .NET »
|
After display message of Response.End() |
Posted Date: 22 May 2012 Posted By:: Lawrence Member Level: Gold Member Rank: 317 Points: 3
Responses:
10
|
Hi Everyone, I open Excel sheet, in that coding i put Response.End() at last of the coding. After or before I display Message but it's not shown...How to display that message...Just tell the solution...
Eg: Excel Coding ----- ----- --- . . . . . Response.End(); Label1.Text="Success";
Excel sheet open but that message only not shown....
Thanks In Advanced
|
Responses
|
#671845 Author: Prachi Kulkarni Member Level: Gold Member Rank: 25 Date: 22/May/2012 Rating:  Points: 3 | Hi, In Response.End (), End method causes the Web server to stop processing the script and return the current result. Hence remaining contents of the file are not processed.You put Label1.Text="Success"; sentence before Response.End() sentence and check whether the message is shown or not.
I hope it will help you. Regards, Prachi Kulkarni.
| #671847 Author: Lawrence Member Level: Gold Member Rank: 317 Date: 22/May/2012 Rating:  Points: 1 | Thanks for ur reply....I put already before Response.End()....but that also not shown the message...Any other sloution...Just tell me....
Thanks In Advanced
| #671848 Author: sudhajosyula Member Level: Gold Member Rank: 46 Date: 22/May/2012 Rating:  Points: 2 | If you want to display a success message than you have to take out the response.End(),because if you keep it it will stops all execution on the page.Other alternative solution is open the excel file in a pop window on close display label message in your current page.
| #671851 Author: Lawrence Member Level: Gold Member Rank: 317 Date: 22/May/2012 Rating:  Points: 1 | Thanks for ur reply...If u have any coding just tell me....
Thanks In Advanced
| #671857 Author: Asheej T K Member Level: Diamond Member Rank: 2 Date: 22/May/2012 Rating:  Points: 2 | Hi,
In place of Response.End try to use HttpContext.Current.ApplicationInstance.CompleteRequest and see if it works.
Otherwise after executing Response.End call a seperate function to show the message.
Regards, Asheej T K Microsoft MVP[ASP.NET/IIS] DotNetSpider MVM
Dotnet Galaxy
| #671870 Author: Lawrence Member Level: Gold Member Rank: 317 Date: 22/May/2012 Rating:  Points: 1 | Thanks for ur reply...I also give that HttpContext.Current.ApplicationInstance.CompleteRequest, but the message not shown.... I put breakpoint and check that coding....while the breakpoint come to Response.End() and not going to next line even close bracket also...immediately show the screen and open the excel sheet...only....
Thanks In Advanced
| #671885 Author: Nishanth Mohan Member Level: Bronze Member Rank: 4848 Date: 22/May/2012 Rating:  Points: 2 | Before Response.End, you are assigning the value to the Label. But the script will stop running when you call Response.End, and the page won't render anything further including the label.
| #671914 Author: Lawrence Member Level: Gold Member Rank: 317 Date: 22/May/2012 Rating:  Points: 1 | Thanks for ur reply....then what to do.... Any alternative solution.....Just tell the solution....
Thanks In Advanced
| #672007 Author: Asheej T K Member Level: Diamond Member Rank: 2 Date: 22/May/2012 Rating:  Points: 2 | Hi,
Did you try the code like below?
Excel Coding ----- ----- --- . . . . . Label1.Text="Success"; HttpContext.Current.ApplicationInstance.CompleteRequest;
Regards, Asheej T K Microsoft MVP[ASP.NET/IIS] DotNetSpider MVM
Dotnet Galaxy
| #672109 Author: Lawrence Member Level: Gold Member Rank: 317 Date: 22/May/2012 Rating:  Points: 1 | Thanks for ur reply....I already did like that coding....but that also not shown the label message....Pls Any other solution....
Thanks In Advanced
|
|
| Post Reply |
|
|
|
 | | This thread is locked for new responses. Please post your comments and questions as a separate thread. If required, refer to the URL of this page in your new post. |
|
|
|
|
 Follow us on Twitter: https://twitter.com/dotnetspider
|
|