473,624 Members | 1,957 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Redirect during Async Postback causing an error

The error that pops up in a JS alert box is:

Sys.WebForms.Pa geRequestManage rParserErrorExc eption: The message from
the server could not be parsed. ... "<DOCTYPE ..."

I have three update panels and a couple of AJAX toolkit extenders on
the page. The button that causes the problem is simply sending an
email then redirecting to a "Thank You" page. There are two update
panels that are both set to conditionally trigger on that button
click. The reason for these update panels is multiple validation
groups that need to be validated. When I Googled this problem, all I
got was that Response.Redire ct() is suppossed to work, but it doesn't.
I am using .NET 3.5.

Thanks in advance for any help.
Norm

P.S. I might be missing something stupid, I've been up for a long time.
Jun 27 '08 #1
2 4001
On May 2, 8:19*am, Norm <neon...@gmail. comwrote:
The error that pops up in a JS alert box is:

Sys.WebForms.Pa geRequestManage rParserErrorExc eption: The message from
the server could not be parsed. ... "<DOCTYPE ..."

I have three update panels and a couple of AJAX toolkit extenders on
the page. The button that causes the problem is simply sending an
email then redirecting to a "Thank You" page. There are two update
panels that are both set to conditionally trigger on that button
click. The reason for these update panels is multiple validation
groups that need to be validated. When I Googled this problem, all I
got was that Response.Redire ct() is suppossed to work, but it doesn't.
I am using .NET 3.5.

Thanks in advance for any help.
Norm

P.S. I might be missing something stupid, I've been up for a long time.
I ended up doing it on the client. The was my solution: (slash
workaround)

ScriptManager.R egisterClientSc riptBlock(Me, GetType(Object) ,
"redirect", "window.locatio n.href='Request Submit.aspx'", True)

Happy coding!
Jun 27 '08 #2
generally you can not do a response redirect from an async postback. the ajax
call wants to parse the reponse to decide what to do. unless the page your
code redirects knows what type of response to build and send back (no builtin
support for this), the client side gets this error.

the most common solution is redirecting from an async postback is to use
ScriptManager.R egisterStartupS cript to render javascript that does the
redirect (document.locat ion.href)
-- bruce (sqlwork.com)
"Norm" wrote:
The error that pops up in a JS alert box is:

Sys.WebForms.Pa geRequestManage rParserErrorExc eption: The message from
the server could not be parsed. ... "<DOCTYPE ..."

I have three update panels and a couple of AJAX toolkit extenders on
the page. The button that causes the problem is simply sending an
email then redirecting to a "Thank You" page. There are two update
panels that are both set to conditionally trigger on that button
click. The reason for these update panels is multiple validation
groups that need to be validated. When I Googled this problem, all I
got was that Response.Redire ct() is suppossed to work, but it doesn't.
I am using .NET 3.5.

Thanks in advance for any help.
Norm

P.S. I might be missing something stupid, I've been up for a long time.
Jun 27 '08 #3

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

Similar topics

0
1182
by: Greg | last post by:
I have a form that creates and updates a pound table during a postback, and right before I submit the form I do a window.open to launch another page that reads from the pound table which stores where the postback is (Step 1, Step 2, etc) auto refreshing every 5 seconds. The problem I have is right after it spawns and loads originally, when it refreshes, it waits for the original form to complete its postback before it runs its own...
6
10449
by: Vanessa | last post by:
I have a question regarding async mode for calling Microsoft.XMLHTTP object. Microsoft.XMLHTTP hangs the IE once in a while suddenly, but it will work again after half an hour or so without doing anything. I have searched through the Internet and seems like the reason it hangs the browser it's because XMLHTTP limits you to two concurrent HTTP connections to each remote host; so if more than 2 concurrent connections strike the script...
2
1827
by: Paul K | last post by:
I have the user selecting a record on one page of the web app I'm working on. After they select a record, I save the record into a session variable and submit the main page (in another window). In the main page I then set some edit boxes to the values contained in the record. The only problem with this scenario is that the data is not being saved in the edit boxes during the postback. Here's the javascript code I'm using to submit the...
2
4331
by: RAJ | last post by:
In our multi-tier application, we have several ASP.NET user controls which will update the same data source provided by middle tier logic. In this particular scenario we have one user control displaying the contents of the data source, whilst another control updates the datasource via a command buttons implementation of 'Click', an event raised in the 'Handle Postback Events' stage of the control execution life cycle (via the...
0
1701
by: JeffM | last post by:
This seems odd, but it appears that the Page_Unload event is fired twice on a Response.Redirect or a Server.Transfer. The output below demonstrates that during the move from the first to the 2nd page, the event fires twice on the 1st page during Postback. The "var" set the first time is visible the 2nd time it fires. Anyone else notice this? Thanks, Jeff
12
3461
by: =?Utf-8?B?cGI=?= | last post by:
I am having trouble doing a redirect in an async asp.net implemention. Most of the time it works, but when it doesn't it just "hangs", the browser never gets any return page. If I run it under the debugger, it works fine, though every so often I get a HttpException. System.Web.HttpException was caught ErrorCode=-2147024809 Message="An error occurred while communicating with the remote host. The error code is 0x80070057."...
0
2160
by: koredump | last post by:
Hi all, I have a windows app that makes some asyc calls to my webservice (WSE 3.0 with MTOM). exception gets thrown in the client win app. I know this exception is caused on the async completed call back, but I have not been able to catch it and dispose of it. How can gracefully handle this exception?
1
20603
by: Ryan Liu | last post by:
Hi, I have a 100 clients/ one server application, use ugly one thread pre client approach. And both side user sync I/O. I frequently see the error on server side(client side code is same, but I don't see the error): "System.IO.IOException: Unable to read data from the transport connection:A blocking operation was interrupted by a call to WSACancelBlockingCall"
4
2192
by: =?Utf-8?B?WWFua2VlIEltcGVyaWFsaXN0IERvZw==?= | last post by:
I need to do a simple asych post back to validate that an id is unique. I do not want to post back the entire page for this, but i want to make this part of the clientside validators. 1. i already have a custom validator that checks for a correctly formatted id and the javascript works w/o problem. Any help would be appreciated. -- Share The Knowledge. I need all the help I can get and so do you!
0
8174
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8624
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8336
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8478
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7164
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6111
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5565
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2607
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1485
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.