473,883 Members | 2,186 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 4011
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
1194
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
10467
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
1838
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
4378
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
1726
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
3486
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
2176
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
20668
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
2202
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
9953
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11166
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10768
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
10868
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
10422
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...
1
7980
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
5808
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6009
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3242
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.