473,387 Members | 1,481 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,387 software developers and data experts.

Server.Transfer [System.Threading.ThreadAbortException] Blank Page

Here's an interesting one... received the {Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.} exception when attempting a Server.Transfer("Page.aspx"). This came about when i upgraded from VWD 2005 to VWD 2008, but kept the .NET framework 2.0 (instead of moving immediately to 3.5).

I have a master page controlling the orderbasket.aspx page, and it is from the orderbasket.aspx page that i am transferring control to the 'Page.aspx' page. This was working before, but since the move it only shows a blank page. The control does get passed to the 'Page.aspx' page and the code runs, but when it finishes a blank page appears instead. I have tried Server.Execute and every other possible solution but now im stumped! Possibly a machine.config change from 2005?

Any help appreciated, Thanks
Jan 15 '08 #1
3 5773
kunal pawar
297 100+
Please show your code, so we will able to find any solutuion
Jan 16 '08 #2
The NewTransaction page is ok and does load properly, only when the Server.Transfer is used does the page show up blank. The Server.Execute method effectively executes the code, but then returns back to the orderbasket page after a brief display of the newtransaction page.

OrderBasket.aspx.cs:
protected void buttonConfirm_Click(object sender, System.EventArgs e)
{
//Add the transactiondetails to the context
Context.Items.Add("TransactionDetails", ViewState["TransactionDetails"]);

//Add the lineitem details to the context
Context.Items.Add("LineItems", ViewState["LineItems"]);

//Add to viewstate
Context.Items["BasketPresent"] = true;

// Transfer control
Server.Transfer("NewTransaction.aspx");
}


MasterPage:
<asp:contentplaceholder id="contentplaceholderContent" runat="server"/><br />

OrderBasket.aspx:
<asp:content id="contentInfo" contentplaceholderid="contentplaceholderContent" runat="server">
<asp:panel id="panelOrderBasket" runat="Server" Width="1130" HorizontalAlign="Center" Visible="True">
.
.
<asp:Button id="buttonConfirm" OnClick="buttonConfirm_Click" runat="server" CssClass="clsInputButton"></asp:Button>
.
.
</asp:panel>
Jan 16 '08 #3
Found a workaround- for some reason once the NewTransaction page had been rendered, the OrderBasket page contents from prior were being rendered over it. Not the best solution but a simple "this.Visible= false" after the transfer (in the buttonConfirm_Click method) did the trick.
Jan 16 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Tom | last post by:
Hi I am trying to transfer to a different .ASPX page using Server.Transfer. However, I get the following error: "Error executing child request for .aspx." Anyone know why? Thanks for...
8
by: shin | last post by:
hi i have an asp.net page and i am trying to transfer control to another asp.net page response.redirect works fine but server.transfer gives me the foll error why is that ...
5
by: Jan | last post by:
Hi, If I put a try catch block for Server.Transfer call. It will catch a System.Threading.ThreadAbortException exception like this. However, it transfer the page to the correct page. Why did...
9
by: Mark | last post by:
Hello I'm trying to use a Server.Transfer in a try-catch (I cannot put it outside the Try-Catch as it is nested deep within a component that is called in a try-catch loop) The problem is that the...
3
by: srikirti | last post by:
I used the context object the following way to use server.transfer to pass the dat Context.Items.Add("SessionID",strSessionID) Server.Transfer("WebForm2.aspx") here strSessionID is public...
5
by: Guadala Harry | last post by:
I've been reading up on Server.Transfer as well as doing some testing, and it appears to always raise the ThreadAbortException error. On one hand I've read a bunch of promotional-type material...
5
by: Robin | last post by:
When using server.transfer generates the following error. Thread was being aborted Mscorlib I have added Catch threadEx As System.Threading.ThreadAbortException ' do nothing
1
by: Fred | last post by:
Why do server.transfer statements in my app. always generate runtime errors like this: A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll An...
4
by: Totto | last post by:
Hi, I'm doing a server.transfer from a click event of a button, but an exception is raised with "Thread was being aborted" Anyone know why? Thanks Tor
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.