<?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 Discussion and Suggestions</title><link>http://forums.asp.net/1007.aspx</link><description>This forum is the place for ASP.NET AJAX 'getting started' questions, general questions that don't fit in one of the other forums about AJAX </description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Start callback immediately after page loaded</title><link>http://forums.asp.net/thread/1819599.aspx</link><pubDate>Tue, 24 Jul 2007 06:14:29 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1819599</guid><dc:creator>Jin-Yu Yin - MSFT</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1819599.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1007&amp;PostID=1819599</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;If&amp;nbsp;the contents of the panel are very large,you can&amp;nbsp;delay by&amp;nbsp;several seconds to load the content.&lt;/p&gt;
&lt;p&gt;You don&amp;#39;t need to load it when the whole page load.when the whole page is&amp;nbsp;loading,set the panel unvisible.&lt;/p&gt;
&lt;p&gt;Then load the content of the panel.&lt;/p&gt;
&lt;p&gt;Code as follow:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;lt;%@ Page Language=&amp;quot;C#&amp;quot; %&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD XHTML 1.0 Transitional//EN&amp;quot; &amp;quot;&lt;a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;&lt;font color="#034efa"&gt;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&lt;/font&gt;&lt;/a&gt;&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;script runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected void Button1_Click(object sender, EventArgs e)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Threading.Thread.Sleep(3000);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TextBox1.Text = DateTime.Now.ToString();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;function delayLoad()&lt;br /&gt;{&lt;br /&gt;document.getElementById(&amp;quot;&amp;lt;%= Button1.ClientID %&amp;gt;&amp;quot;).click();&lt;br /&gt;document.getElementById(&amp;quot;&amp;lt;%= UpdateProgress1.ClientID %&amp;gt;&amp;quot;).style.display = &amp;quot;block&amp;quot;;&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;html xmlns=&amp;quot;&lt;a href="http://www.w3.org/1999/xhtml"&gt;&lt;font color="#034efa"&gt;http://www.w3.org/1999/xhtml&lt;/font&gt;&lt;/a&gt;&amp;quot; &amp;gt;&lt;br /&gt;&amp;lt;head id=&amp;quot;Head1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;Untitled Page&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body onload=&amp;quot;&lt;strong&gt;setTimeout(&amp;#39;delayLoad()&amp;#39;,3000)&amp;quot;&amp;gt;&lt;/strong&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;form id=&amp;quot;form1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:ScriptManager ID=&amp;quot;ScriptManager1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/asp:ScriptManager&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:UpdatePanel ID=&amp;quot;UpdatePanel1&amp;quot; runat=&amp;quot;server&amp;quot; UpdateMode=&amp;quot;Conditional&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ContentTemplate&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:TextBox ID=&amp;quot;TextBox1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/asp:TextBox&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div visible=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;asp:Button ID=&amp;quot;Button1&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;quot;Button&amp;quot; OnClick=&amp;quot;Button1_Click&amp;quot; /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ContentTemplate&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/asp:UpdatePanel&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:UpdateProgress ID=&amp;quot;UpdateProgress1&amp;quot; runat=&amp;quot;server&amp;quot; AssociatedUpdatePanelID=&amp;quot;UpdatePanel1&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ProgressTemplate&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Waiting..............&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ProgressTemplate&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/asp:UpdateProgress&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/div&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/form&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;More informatin,see:&lt;a href="http://forums.asp.net/t/1127147.aspx"&gt;&lt;font color="#5403fa"&gt;Delaying Content Load using Timer and UpdatePanel&lt;/font&gt;&lt;/a&gt;&amp;nbsp;AND &lt;a href="http://forums.asp.net/t/1134594.aspx"&gt;&lt;font color="#5403fa"&gt;Controlling visibility of contents of collapsiblepanel&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item><item><title>Re: Start callback immediately after page loaded</title><link>http://forums.asp.net/thread/1812696.aspx</link><pubDate>Thu, 19 Jul 2007 15:24:04 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1812696</guid><dc:creator>miksh</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1812696.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1007&amp;PostID=1812696</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;gt1329a:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;If it feels better to abstract how you inject them, you could use ClientScript.GetPostBackEventReference(UpdatePanel1, &amp;quot;&amp;quot;) to generate the actual call.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;This looks more resanable, thanks. So far, I added a hidden button inside an UpdatePanel and make a javasript&amp;#39;s click on it to trigger the update. But I like your approach more.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Start callback immediately after page loaded</title><link>http://forums.asp.net/thread/1812666.aspx</link><pubDate>Thu, 19 Jul 2007 15:14:23 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1812666</guid><dc:creator>gt1329a</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1812666.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1007&amp;PostID=1812666</wfw:commentRss><description>&lt;p&gt;They really aren&amp;#39;t anything to worry about, in my experience.&amp;nbsp; If you&amp;#39;ve ever used a GridView, DataGrid, LinkButton, or half a dozen other common controls, you&amp;#39;re already relying on the __doPostBack() mechanism.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;If it feels better to abstract how you inject them, you could use ClientScript.GetPostBackEventReference(UpdatePanel1, &amp;quot;&amp;quot;) to generate the actual call.&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Start callback immediately after page loaded</title><link>http://forums.asp.net/thread/1812157.aspx</link><pubDate>Thu, 19 Jul 2007 11:24:30 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1812157</guid><dc:creator>miksh</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1812157.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1007&amp;PostID=1812157</wfw:commentRss><description>&lt;p&gt;Usually I try to avoid any explicit __doPostBack(...) calls.&lt;/p&gt;</description></item><item><title>Re: Start callback immediately after page loaded</title><link>http://forums.asp.net/thread/1811446.aspx</link><pubDate>Thu, 19 Jul 2007 02:53:15 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1811446</guid><dc:creator>Steve Marx</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1811446.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1007&amp;PostID=1811446</wfw:commentRss><description>&lt;p&gt;Here are a couple more ideas I blogged a while ago: &lt;a href="http://smarx.com/posts/delayed-load-with-an-updatepanel.aspx"&gt;http://smarx.com/posts/delayed-load-with-an-updatepanel.aspx&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Re: Start callback immediately after page loaded</title><link>http://forums.asp.net/thread/1811385.aspx</link><pubDate>Thu, 19 Jul 2007 01:46:25 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1811385</guid><dc:creator>gt1329a</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1811385.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1007&amp;PostID=1811385</wfw:commentRss><description>Which part are you uncomfortable with?&lt;br /&gt;</description></item><item><title>Re: Start callback immediately after page loaded</title><link>http://forums.asp.net/thread/1811348.aspx</link><pubDate>Thu, 19 Jul 2007 00:58:13 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1811348</guid><dc:creator>miksh</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1811348.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1007&amp;PostID=1811348</wfw:commentRss><description>&lt;p&gt;Thanks, I&amp;#39;ll try but IMHO this hack might be not compatible with the next ajax versions.&lt;/p&gt;
&lt;p&gt;I forgot to mention that my UpdatePanel is updated by a timer. Is there any way to&amp;nbsp;fire the timer&amp;#39;s OnTick event immediately?&lt;br /&gt;Any other ideas to trigger the UpdatePanel on client-side?&lt;/p&gt;</description></item><item><title>Re: Start callback immediately after page loaded</title><link>http://forums.asp.net/thread/1811318.aspx</link><pubDate>Thu, 19 Jul 2007 00:18:12 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1811318</guid><dc:creator>gt1329a</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1811318.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1007&amp;PostID=1811318</wfw:commentRss><description>You could use the OnLoad event of the UpdatePanel to render the panel&amp;#39;s contents, and IsPostBack to not render that content on the initial page load.&amp;nbsp; Then, in your client script, call __doPostBack(&amp;quot;UpdatePanel&amp;quot;, &amp;#39;&amp;#39;) from pageLoaded() to trigger that UpdatePanel_Load code.&lt;br /&gt;</description></item><item><title>Start callback immediately after page loaded</title><link>http://forums.asp.net/thread/1811121.aspx</link><pubDate>Wed, 18 Jul 2007 20:47:37 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1811121</guid><dc:creator>miksh</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1811121.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1007&amp;PostID=1811121</wfw:commentRss><description>&lt;p&gt;I have a UpdatePanel on the page. But instead of the standard scenario when the page is completly rendered on the first call I need to display an empty panel content with the loading indicator and start update immediately after the page has been loaded.&lt;/p&gt;
&lt;p&gt;How to impelment it?&lt;/p&gt;</description></item></channel></rss>