<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>ASP.NET AJAX UI</title><link>http://forums.asp.net/1008.aspx</link><description>Here you can discuss UI-related issues with AJAX such as controls and client-side functionality including Silverlight controls for ASP.NET</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: UpdateProgress, Server.execute and Sys.WebForms.PageRequestManagerParserErrorException</title><link>http://forums.asp.net/thread/2190979.aspx</link><pubDate>Fri, 22 Feb 2008 22:52:58 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2190979</guid><dc:creator>kirchi</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2190979.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1008&amp;PostID=2190979</wfw:commentRss><description>&lt;p&gt;Yes sure -&lt;/p&gt;
&lt;p&gt;you should not generate reports in GetReport.aspx if you use my 2-nd supposed scenario.&lt;/p&gt;
&lt;p&gt;Instead move your methods to first page (or some shared code - like App_Code), also you will need to modify it the way it writes reports to the temporary directory as files.&lt;/p&gt;
&lt;p&gt;in step 4 - after you generated the report just wrtite script using this method:&lt;/p&gt;
&lt;p&gt;string initScript = &amp;quot;var rnd=new Date();$get(&amp;#39;ifr&amp;#39;).src=&amp;#39;&amp;quot;+myGeneratedFileName+&amp;quot;&amp;#39;+&amp;#39;?rnd=&amp;#39;+rnd;&amp;quot;;&lt;/p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;ScriptManager&lt;/font&gt;&lt;font size="2"&gt; Smgr = &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;ScriptManager&lt;/font&gt;&lt;font size="2"&gt;.GetCurrent(Page);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;font size="2"&gt; (Smgr != &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;null&lt;/font&gt;&lt;font size="2"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;font size="2"&gt; (Smgr.IsInAsyncPostBack)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;ScriptManager&lt;/font&gt;&lt;font size="2"&gt;.RegisterStartupScript(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;font size="2"&gt;.GetType(), &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;FireDownloadScript&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;, initScript, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;true&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;more important here is initScript variable - you will place there the javascript that will execute in browser right after client gets response.&lt;/p&gt;
&lt;p&gt;You can find more about this method here: &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.ui.scriptmanager.registerstartupscript.aspx"&gt;http://msdn2.microsoft.com/en-us/library/system.web.ui.scriptmanager.registerstartupscript.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: UpdateProgress, Server.execute and Sys.WebForms.PageRequestManagerParserErrorException</title><link>http://forums.asp.net/thread/2190943.aspx</link><pubDate>Fri, 22 Feb 2008 22:29:58 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2190943</guid><dc:creator>HeatherGebbia</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2190943.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1008&amp;PostID=2190943</wfw:commentRss><description>&lt;p&gt;Can you explain #4 above?&amp;nbsp; Do I use &lt;font size="2"&gt;ScriptManager.RegisterStartupScript on the page where my code is running the report (GetReport.aspx)?&amp;nbsp; This code expects some arguments and since I&amp;#39;ve never used ScriptManager.RegisterStartupScript before, can you tell me what arguments need to go there?&amp;nbsp; Thanks so much for your help!&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: UpdateProgress, Server.execute and Sys.WebForms.PageRequestManagerParserErrorException</title><link>http://forums.asp.net/thread/2190891.aspx</link><pubDate>Fri, 22 Feb 2008 21:49:33 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2190891</guid><dc:creator>kirchi</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2190891.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1008&amp;PostID=2190891</wfw:commentRss><description>&lt;p&gt;the previous post submitted twice, so I am clearing this ...&lt;/p&gt;</description></item><item><title>Re: UpdateProgress, Server.execute and Sys.WebForms.PageRequestManagerParserErrorException</title><link>http://forums.asp.net/thread/2190890.aspx</link><pubDate>Fri, 22 Feb 2008 21:49:17 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2190890</guid><dc:creator>kirchi</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2190890.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1008&amp;PostID=2190890</wfw:commentRss><description>&lt;p&gt;Hi HeatherGebbia,&lt;/p&gt;
&lt;p&gt;I suppose the following scenario: &lt;/p&gt;
&lt;p&gt;1) place the&amp;nbsp; button, hidden iframe and hidden progress indicator (span for example) into the form:&lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;Button&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;runat&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;server&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;ID&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;btn&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;OnClientClick&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;$get(&amp;#39;ifr&amp;#39;).src=&amp;#39;var rnd=new Date();GetReport.aspx?rnd=&amp;#39;+rnd;&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;/&amp;gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;iframe&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;id&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;ifr&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;name&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;ifr&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;style&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;display&lt;/font&gt;&lt;font size="2"&gt;:&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;none&amp;quot;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;iframe&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here GetReport.aspx is the &amp;quot;second&amp;quot; page, that generated the report:&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;protected&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;font size="2"&gt; Page_Load(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;object&lt;/font&gt;&lt;font size="2"&gt; sender, &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;EventArgs&lt;/font&gt;&lt;font size="2"&gt; e)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;Thread&lt;/font&gt;&lt;font size="2"&gt;.Sleep(3000);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;Response.ClearHeaders();&lt;/p&gt;Response.ContentType = &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;application/octet-stream&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;Response.AddHeader(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;content-disposition&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;attachment; filename=MVCToolkit.zip&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/p&gt;Response.WriteFile(Server.MapPath(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;~/MVCToolkit.zip&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;));&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;Response.End();&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;That&amp;#39;s it &lt;/p&gt;
&lt;p&gt;Now you should change the content type to desired one (I suppose pdf in your case)&lt;/p&gt;
&lt;p&gt;BUT here you can not use Progress Indicator.&lt;/p&gt;
&lt;p&gt;If you need progress indicator do the following (in more simple words):&lt;/p&gt;
&lt;p&gt;1) Place a button in an UpdatePanel&lt;/p&gt;
&lt;p&gt;2) User Clicks on Button and Ajax Progress Indicator simply shows that there is some work performing behids the scene&lt;/p&gt;
&lt;p&gt;3) On the server generate report into temporary directory.&lt;/p&gt;
&lt;p&gt;4) On the server after report is ready register startup script using ScritManager.RegisterStartupScript method, the script will change the src property of an hidden iframe and point it to the generated file.&lt;/p&gt;
&lt;p&gt;5) on the browser user will see that progress interrupted - because asynchronous postback finished and returned, but immidiately executes javascript that pops up a save/open dialog.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hope this helps&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: UpdateProgress, Server.execute and Sys.WebForms.PageRequestManagerParserErrorException</title><link>http://forums.asp.net/thread/2190747.aspx</link><pubDate>Fri, 22 Feb 2008 19:57:43 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2190747</guid><dc:creator>HeatherGebbia</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2190747.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1008&amp;PostID=2190747</wfw:commentRss><description>&lt;p&gt;Thanks for the response.&amp;nbsp; Since I can&amp;#39;t use server.execute to accomplish this, can you give me an example of how to do it in an HTTPHandler?&amp;nbsp; I have never used that before.&amp;nbsp; Thanks!&lt;/p&gt;</description></item><item><title>Re: UpdateProgress, Server.execute and Sys.WebForms.PageRequestManagerParserErrorException</title><link>http://forums.asp.net/thread/2188871.aspx</link><pubDate>Fri, 22 Feb 2008 03:20:05 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2188871</guid><dc:creator>chetan.sarode</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2188871.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1008&amp;PostID=2188871</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;It is not a good practice to use Response.Write or server.execute from within an ASP.NET page in general. As UpdatePanels work by intercepting the page rendering process you are recieving the errors. &lt;/p&gt;
&lt;p&gt;You can put the code to generate the data in an HTTPHandler or you can make the button a PostBackTrigger.&lt;/p&gt;
&lt;p&gt;Because of the way updatepanels manage the DOM elements within them, you cannot use Response.Write() with them.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://weblogs.asp.net/leftslipper/archive/2007/02/26/sys-webforms-pagerequestmanagerparsererrorexception-what-it-is-and-how-to-avoid-it.aspx"&gt;&lt;font color="#034efa"&gt;http://weblogs.asp.net/leftslipper/archive/2007/02/26/sys-webforms-pagerequestmanagerparsererrorexception-what-it-is-and-how-to-avoid-it.aspx&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://vijaymodi.wordpress.com/2007/04/13/syswebformspagerequestmanagerparsererrorexception/"&gt;&lt;font color="#034efa"&gt;http://vijaymodi.wordpress.com/2007/04/13/syswebformspagerequestmanagerparsererrorexception/&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://forums.asp.net/t/1038252.aspx"&gt;&lt;font color="#034efa"&gt;http://forums.asp.net/t/1038252.aspx&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Adding &lt;span class="threadMessageBody"&gt;&lt;span&gt;&lt;span&gt;&lt;font style="BACKGROUND-COLOR:#000000;"&gt;&lt;font style="BACKGROUND-COLOR:#ffffff;"&gt;&lt;font size="2"&gt;&lt;font color="#ff0000"&gt;&lt;font color="#0000ff"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000"&gt;pages &lt;/font&gt;enableEventValidation&lt;/font&gt;&lt;font color="#0000ff"&gt;=&lt;/font&gt;&amp;quot;&lt;font color="#0000ff"&gt;false&lt;/font&gt;&amp;quot;/&amp;gt; to your web.config (inside system.web) usually works when setting ValidateRequest=&amp;quot;false&amp;quot; does not.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="threadMessageBody"&gt;&lt;span&gt;&lt;span&gt;For more information about &lt;font color="#ff0000"&gt;EnableEventValidation, &lt;/font&gt;see: &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.ui.page.enableeventvalidation.aspx"&gt;&lt;font color="#034efa"&gt;http://msdn2.microsoft.com/en-us/library/system.web.ui.page.enableeventvalidation.aspx&lt;/font&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>UpdateProgress, Server.execute and Sys.WebForms.PageRequestManagerParserErrorException</title><link>http://forums.asp.net/thread/2188564.aspx</link><pubDate>Thu, 21 Feb 2008 22:50:23 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2188564</guid><dc:creator>HeatherGebbia</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2188564.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1008&amp;PostID=2188564</wfw:commentRss><description>&lt;p&gt;Hi, I have an UpdateProgress control on Page A that shows a &amp;quot;Please wait...&amp;quot; message after the user clicks a button to run a report.&amp;nbsp; When the button is clicked I run a response.redirect to Page B that has the code for running the report.&amp;nbsp; The problem with that is the &amp;quot;Please wait...&amp;quot; message stays visible on&amp;nbsp;Page A&amp;nbsp;forever, even after the pdf report comes up in another window.&amp;nbsp; This happens because the code that runs the report is on Page B, and the code does not return to Page A where the UpdateProgress control is so it doesn&amp;#39;t turn off.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;I read somewhere that I could use server.execute instead of response.redirect which will execute the report code on Page B, then return the focus to Page A so that the &amp;quot;Please wait...&amp;quot; message will turn off.&amp;nbsp; I tried this and it would have worked perfectly if it weren&amp;#39;t for the Sys.WebForms.PageRequestManagerParserErrorException error message.&amp;nbsp; When the code finishes on Page B and the focus is back to Page A, the &amp;quot;Please wait...&amp;quot; message does in fact disappear as it should, but the report does not come up in&amp;nbsp;a pdf window because of the error message.&amp;nbsp; Does anyone have any ideas how I can get around this?&amp;nbsp; I read a long post about this error message, but none of the work-arounds seem to work for me.&amp;nbsp; Is it because I am using server.execute?&amp;nbsp; If so, is there some other way that I can redirect to Page B to run the report, but then somehow turn off the visibility of the UpdateProgress control when the code on Page B completes?&amp;nbsp; The UpdateProgress control is on Page A and I don&amp;#39;t know how to turn off the visibility once the code in Page B completes.&amp;nbsp; Is there code I can use in Page B to turn off the visibility of a control in Page A?&lt;/p&gt;
&lt;p&gt;Thanks for any help you can provide!&lt;/p&gt;</description></item></channel></rss>