Why Response.Write does not work with ‘Atlas’ Update Panel ?

  • Share/Save/Bookmark

Have you ever tried using Response.Write in combination with ‘Atlas’ Update panel? If not try using that. I am sure that it does not work. It’s always irritating when you get to know that basic things like Response.write, Response.buffer etc don’t work with the Powerful tool like Update Panel. In this article i will try to explain you why Response.Write does not work  with Atlas Update Panel and more of alternative solution to come over this problem.

Atlas Update Panel is a great tool to boost the performance of your application, When you use Update Panel in your page all the partial page post backs exchanges the data from server to client using XML. So when you request some thing on server Update Panel uses XMLHttpRequest to get/post from/to server and server in return sends the data using XML. On the client side XML parser will parse the XML we got from the server and then partial rendering will be done.

So if you see every thing happening using XML, When you use Response.Write it injects output string into XML being returned for the page partial post back. On the client side our XML parser could not parse the XML if it doesn’t understand the XML. So when our response injected into XML , Parse could not do anything other than throwing non understandable error to the user. Some times you may not use the response.write but if you are getting Response Error it could be either Response.Filter or Buffer etc. so how can we work around this problem or how do we handle this exception error.

In my Previous article ‘How to handle PageRequestManager ParserError Exception?’ i have explained the ways to debug this problem and handling or customizing the error message. The alternative ways we have, to write the response to page with out using Response.Write is using Server side labels and write your response on label. Instead of message if you want to run some client side script then read my previous article Register JavaScript Code on the server side when you use update panel in your page. This article will explain you to execute your client side script after server side code get finished.

If you have any other alternative ways of coming over this problem, leave a comment with your solution.

Categories : ASP.Net

Leave a Reply

About Techieon

Techieon is all about sharing Development experience of experienced talented developers of different technologies working in real time. Here at Techieon we talk about latest updates of different technologies, provide solutions to the developers problems, write tutorials on frequently used tools of development and provide tips to developers day to day activities.

This is a Widget Section

This section is widgetized. If you would like to add content to this section, you may do so by using the Widgets panel from within your WordPress Admin Dashboard. This Widget Section is called "Feature Bottom Middle"

Want to Write for Techieon?

Techieon have few opening positions for talented developers who want to share their development experience with Techieon users.If you are interested in writing at Techieon please Contact us or e-mail me for more information.