Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 27th, 2006, 05:48 PM
Authorized User
 
Join Date: Apr 2006
Posts: 56
Thanks: 0
Thanked 0 Times in 0 Posts
Default Message-thread is getting aborted.

I have a form with textfields. now when I hit the submit button .The data gets saved in the database and the value of the textfield shows in the different page.
I am using Server.Transfer to do this.If I try this code in a smaller version, it works fine. But if I put it under try and catch it gives me the error."Thread is getting aborted
Here is the code=for the first page-

Context.Items.Add("first",txtfirstname.Text);
Server.Transfer("newrecord.aspx");

code for the destination page-

Label2.Text = (string)Context.Items["first"];
PLease help . I am using C#


 
Old July 27th, 2006, 06:00 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Remove Server.Transfer and any Response.Redirects you may have inside the TRY CATCH block, this is whats causing your error.

And here is the reason why it is causing that error, read half way down the thread.

http://p2p.wrox.com/topic.asp?TOPIC_ID=5989

"The one language all programmers understand is profanity."





Similar Threads
Thread Thread Starter Forum Replies Last Post
Thread was being aborted acko ASP.NET 1.0 and 1.1 Basics 15 March 26th, 2014 02:52 AM
Thread was being aborted error neptas ASP.NET 2.0 Professional 0 January 8th, 2008 08:00 AM
Thread was being aborted sohailmaroof ASP.NET 1.0 and 1.1 Basics 2 January 13th, 2007 02:25 AM
Timeout and Thread was being aborted Vishal_7 ASP.NET 1.0 and 1.1 Basics 0 December 13th, 2004 02:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.