<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/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>Hello Kirti : MIX</title><link>http://blogs.technet.com/kirtid/archive/tags/MIX/default.aspx</link><description>Tags: MIX</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Using UpdatePanels with ModalPopups</title><link>http://blogs.technet.com/kirtid/archive/2007/05/03/using-updatepanels-with-modalpopups.aspx</link><pubDate>Fri, 04 May 2007 02:13:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:879932</guid><dc:creator>kirtid</dc:creator><slash:comments>6</slash:comments><comments>http://blogs.technet.com/kirtid/comments/879932.aspx</comments><wfw:commentRss>http://blogs.technet.com/kirtid/commentrss.aspx?PostID=879932</wfw:commentRss><wfw:comment>http://blogs.technet.com/kirtid/rsscomments.aspx?PostID=879932</wfw:comment><description>&lt;P mce_keep="true"&gt;One of the most frequently asked questions on the &lt;A class="" title="Toolkit Sample Website" href="http://ajax.asp.net/ajaxtoolkit" mce_href="http://ajax.asp.net/ajaxtoolkit"&gt;Toolkit&lt;/A&gt; &lt;A class="" title="Toolkit forums" href="http://forums.asp.net/1022/ShowForum.aspx" mce_href="http://forums.asp.net/1022/ShowForum.aspx"&gt;forums&lt;/A&gt; and at &lt;A class="" title="MIX website" href="http://www.visitmix.com/" mce_href="http://www.visitmix.com"&gt;MIX&lt;/A&gt; after &lt;A class="" title="Shawn's demo blog post" href="http://blogs.msdn.com/sburke/archive/2007/05/01/slides-and-demos-for-mix-toolkit-talk.aspx" mce_href="http://blogs.msdn.com/sburke/archive/2007/05/01/slides-and-demos-for-mix-toolkit-talk.aspx"&gt;Shawn's demo&lt;/A&gt; was how to get &lt;A class="" title="Update Panel documentation" href="http://ajax.asp.net/docs/mref/T_System_Web_UI_UpdatePanel.aspx" mce_href="http://ajax.asp.net/docs/mref/T_System_Web_UI_UpdatePanel.aspx"&gt;UpdatePanels&lt;/A&gt; to work right with &lt;A class="" title="Modal Popup sample" href="http://ajax.asp.net/ajaxtoolkit/ModalPopup/ModalPopup.aspx" mce_href="http://ajax.asp.net/ajaxtoolkit/ModalPopup/ModalPopup.aspx"&gt;ModalPopups&lt;/A&gt;. The trick is to understand that the &lt;A class="" title="ModalPopup sample" href="http://ajax.asp.net/ajaxtoolkit/ModalPopup/ModalPopup.aspx" mce_href="http://ajax.asp.net/ajaxtoolkit/ModalPopup/ModalPopup.aspx"&gt;ModalPopup&lt;/A&gt; extender attaches itself to more than just the TargetControl and PopupControl. If you include the OK and Cancel buttons inside the &lt;A class="" title="ModalPopup sample" href="http://ajax.asp.net/ajaxtoolkit/ModalPopup/ModalPopup.aspx" mce_href="http://ajax.asp.net/ajaxtoolkit/ModalPopup/ModalPopup.aspx"&gt;ModalPopup&lt;/A&gt;&amp;nbsp;Panel in an &lt;A class="" title="Update Panel documentation" href="http://ajax.asp.net/docs/mref/T_System_Web_UI_UpdatePanel.aspx" mce_href="http://ajax.asp.net/docs/mref/T_System_Web_UI_UpdatePanel.aspx"&gt;UpdatePanel&lt;/A&gt;,&amp;nbsp;make sure you include the extender declaration in it as well. If you do not, once a postback occurs the extender will not reinitialize the handlers and you will get null references. Also, if buttons inside the &lt;A class="" title="ModalPopup sample" href="http://ajax.asp.net/ajaxtoolkit/ModalPopup/ModalPopup.aspx" mce_href="http://ajax.asp.net/ajaxtoolkit/ModalPopup/ModalPopup.aspx"&gt;ModalPopup&lt;/A&gt; Panel are set to be OK and Cancel buttons on the &lt;A class="" title="ModalPopup sample" href="http://ajax.asp.net/ajaxtoolkit/ModalPopup/ModalPopup.aspx" mce_href="http://ajax.asp.net/ajaxtoolkit/ModalPopup/ModalPopup.aspx"&gt;ModalPopup&lt;/A&gt;&amp;nbsp;Extender,&amp;nbsp;then their sole purpose is to close the Popup Panel and run their respective scripts if any have been set. They will not perform postbacks or&amp;nbsp;execute any other client side handlers since the&amp;nbsp;&lt;A class="" title="ModalPopup sample" href="http://ajax.asp.net/ajaxtoolkit/ModalPopup/ModalPopup.aspx" mce_href="http://ajax.asp.net/ajaxtoolkit/ModalPopup/ModalPopup.aspx"&gt;ModalPopup&lt;/A&gt;&amp;nbsp;prevents the event from&amp;nbsp;propagating up.&amp;nbsp;&lt;/P&gt;
&lt;P mce_keep="true"&gt;I have attached a sample page that demonstrates three simple scenarios with ModalPopups and UpdatePanels.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;&lt;A class="" title="ModalPopup sample" href="http://ajax.asp.net/ajaxtoolkit/ModalPopup/ModalPopup.aspx" mce_href="http://ajax.asp.net/ajaxtoolkit/ModalPopup/ModalPopup.aspx"&gt;&lt;STRONG&gt;ModalPopup&lt;/STRONG&gt;&lt;/A&gt;&amp;nbsp;&lt;STRONG&gt;with an &lt;/STRONG&gt;&lt;A class="" title="Update Panel documentation" href="http://ajax.asp.net/docs/mref/T_System_Web_UI_UpdatePanel.aspx" mce_href="http://ajax.asp.net/docs/mref/T_System_Web_UI_UpdatePanel.aspx"&gt;&lt;STRONG&gt;UpdatePanel&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt;&amp;nbsp;inside its Popup Panel:&lt;/STRONG&gt; Make sure that the OK and Cancel buttons are not inside the &lt;A class="" title="Update Panel documentation" href="http://ajax.asp.net/docs/mref/T_System_Web_UI_UpdatePanel.aspx" mce_href="http://ajax.asp.net/docs/mref/T_System_Web_UI_UpdatePanel.aspx"&gt;UpdatePanel&lt;/A&gt;&amp;nbsp;otherwise the handlers will be rendered useless on postback. &lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;&lt;STRONG&gt;&lt;A class="" title="Update Panel documentation" href="http://ajax.asp.net/docs/mref/T_System_Web_UI_UpdatePanel.aspx" mce_href="http://ajax.asp.net/docs/mref/T_System_Web_UI_UpdatePanel.aspx"&gt;&lt;STRONG&gt;UpdatePanel&lt;/STRONG&gt;&lt;/A&gt;&amp;nbsp;that contains a &lt;A class="" title="ModalPopup sample" href="http://ajax.asp.net/ajaxtoolkit/ModalPopup/ModalPopup.aspx" mce_href="http://ajax.asp.net/ajaxtoolkit/ModalPopup/ModalPopup.aspx"&gt;&lt;STRONG&gt;ModalPopup&lt;/STRONG&gt;&lt;/A&gt;&amp;nbsp;Extender and its Popup Panel: &lt;/STRONG&gt;Clicking&amp;nbsp;OK&amp;nbsp;or Cancel still does not cause the postback since those buttons are tied to client side handlers. Clicking on any other control will cause the server side handlers to kick in. Since the extender declaration is inside the UpdatePanel, the asynchronous postback causes the ModalPopupBehavior to be reinitialized correctly and any client side handlers are setup again when the request is completed. So if you would like to postback every time the user clicks OK or Cancel, just don't set those properties on the extender. The Modal Popup Panel closes on postback as desired since the entire popup is inside an &lt;A class="" title="Update Panel documentation" href="http://ajax.asp.net/docs/mref/T_System_Web_UI_UpdatePanel.aspx" mce_href="http://ajax.asp.net/docs/mref/T_System_Web_UI_UpdatePanel.aspx"&gt;UpdatePanel&lt;/A&gt;.&lt;/DIV&gt;&lt;/LI&gt;
&lt;LI&gt;
&lt;DIV mce_keep="true"&gt;&lt;STRONG&gt;What if that Popup Panel in # (2) contains an &lt;/STRONG&gt;&lt;A class="" title="Update Panel documentation" href="http://ajax.asp.net/docs/mref/T_System_Web_UI_UpdatePanel.aspx" mce_href="http://ajax.asp.net/docs/mref/T_System_Web_UI_UpdatePanel.aspx"&gt;&lt;STRONG&gt;UpdatePanel&lt;/STRONG&gt;&lt;/A&gt;&lt;STRONG&gt;: &lt;/STRONG&gt;Specify the triggers that will cause the outer panel to update and allow the &lt;A class="" title="Update Panel documentation" href="http://ajax.asp.net/docs/mref/T_System_Web_UI_UpdatePanel.aspx" mce_href="http://ajax.asp.net/docs/mref/T_System_Web_UI_UpdatePanel.aspx"&gt;UpdatePanel&lt;/A&gt;&amp;nbsp;inside the &lt;A class="" title="ModalPopup sample" href="http://ajax.asp.net/ajaxtoolkit/ModalPopup/ModalPopup.aspx" mce_href="http://ajax.asp.net/ajaxtoolkit/ModalPopup/ModalPopup.aspx"&gt;ModalPopup&lt;/A&gt; to operate on its own terms. This time the &lt;A class="" title="ModalPopup sample" href="http://ajax.asp.net/ajaxtoolkit/ModalPopup/ModalPopup.aspx" mce_href="http://ajax.asp.net/ajaxtoolkit/ModalPopup/ModalPopup.aspx"&gt;ModalPopup&lt;/A&gt; Panel does not close on postback triggered from within it because the trigger for the outer panel is specifically set to be a separate button.&lt;/DIV&gt;&lt;/LI&gt;&lt;/OL&gt;
&lt;P mce_keep="true"&gt;It is a good idea to design the page without &lt;A class="" title="Update Panel documentation" href="http://ajax.asp.net/docs/mref/T_System_Web_UI_UpdatePanel.aspx" mce_href="http://ajax.asp.net/docs/mref/T_System_Web_UI_UpdatePanel.aspx"&gt;UpdatePanels&lt;/A&gt;&amp;nbsp;in mind. When writing the page place &lt;A class="" title="Update Panel documentation" href="http://ajax.asp.net/docs/mref/T_System_Web_UI_UpdatePanel.aspx" mce_href="http://ajax.asp.net/docs/mref/T_System_Web_UI_UpdatePanel.aspx"&gt;UpdatePanels&lt;/A&gt;&amp;nbsp;when the rest is done. Once you have the page setup, determine locations in your page that need to be asynchronously&amp;nbsp;updated and the controls that should act as triggers to perform that operation and then appropriately place &lt;A class="" title="Update Panel documentation" href="http://ajax.asp.net/docs/mref/T_System_Web_UI_UpdatePanel.aspx" mce_href="http://ajax.asp.net/docs/mref/T_System_Web_UI_UpdatePanel.aspx"&gt;UpdatePanels&lt;/A&gt;&amp;nbsp;with the correct triggers and UpdateMode property set. With extenders it is important that you take into consideration not just the controls targetted by the extender but any others which it hooks into to provide additional functionality. &lt;/P&gt;
&lt;P mce_keep="true"&gt;This post should evolve as I get more feedback and I will update the sample accordingly as well. I hope this helps.&lt;FONT color=#0000ff&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=879932" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/kirtid/attachment/879932.ashx" length="5234" type="application/x-zip-compressed" /><category domain="http://blogs.technet.com/kirtid/archive/tags/Toolkit/default.aspx">Toolkit</category><category domain="http://blogs.technet.com/kirtid/archive/tags/MIX/default.aspx">MIX</category><category domain="http://blogs.technet.com/kirtid/archive/tags/ModalPopup/default.aspx">ModalPopup</category><category domain="http://blogs.technet.com/kirtid/archive/tags/UpdatePanel/default.aspx">UpdatePanel</category></item><item><title>Silverlight at the end of the tunnel</title><link>http://blogs.technet.com/kirtid/archive/2007/05/03/silverlight-at-the-end-of-the-tunnel.aspx</link><pubDate>Fri, 04 May 2007 00:22:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:878813</guid><dc:creator>kirtid</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/kirtid/comments/878813.aspx</comments><wfw:commentRss>http://blogs.technet.com/kirtid/commentrss.aspx?PostID=878813</wfw:commentRss><wfw:comment>http://blogs.technet.com/kirtid/rsscomments.aspx?PostID=878813</wfw:comment><description>&lt;P&gt;I was in Las Vegas this week attending the &lt;A class="" title="MIX link" href="http://www.visitmix.com/" mce_href="http://www.visitmix.com/"&gt;MIX' 07 conference&lt;/A&gt; along with the rest of the &lt;A class="" title="Toolkit Sample Website" href="http://ajax.asp.net/ajaxtoolkit" mce_href="http://ajax.asp.net/ajaxtoolkit"&gt;Toolkit &lt;/A&gt;team. My team mates, &lt;A class="" title="David's blog" href="http://blogs.msdn.com/delay/" mce_href="http://blogs.msdn.com/delay/"&gt;David Anson&lt;/A&gt; and Ted Glaza worked on the keynote demo that &lt;A class="" title="Scott's blog" href="http://weblogs.asp.net/scottgu/" mce_href="http://weblogs.asp.net/scottgu/"&gt;Scott Guthrie&lt;/A&gt; presented. The demo was written in managed code using the alpha version of the &lt;A class="" title="Silverlight site" href="http://www.microsoft.com/silverlight/" mce_href="http://www.microsoft.com/silverlight/"&gt;Silverlight platform&lt;/A&gt; that &lt;A class="" title="Microsoft link" href="http://www.microsoft.com/" mce_href="http://www.microsoft.com"&gt;Microsoft&lt;/A&gt; showcased at &lt;A class="" title="MIX conference link" href="http://www.visitmix.com/" mce_href="http://www.visitmix.com"&gt;MIX&lt;/A&gt;. It is a cool airline application composed of three core controls, Calendar, FlightPicker and Map. The source code is available for download from &lt;A class="" title="Demo download link" href="http://blogs.msdn.com/delay/archive/2007/05/01/the-web-just-got-even-better-silverlight-announced-at-mix07.aspx" mce_href="http://blogs.msdn.com/delay/archive/2007/05/01/the-web-just-got-even-better-silverlight-announced-at-mix07.aspx"&gt;David's blog&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;&lt;A class="" title="Silverlight site" href="http://www.microsoft.com/silverlight/" mce_href="http://www.microsoft.com/silverlight/"&gt;Silverlight&lt;/A&gt; will be a big leap in terms of the way we perceive the web. Essentially, with the managed code support, one no longer needs to be a web developer to write rich and interactive web applications. There is no need to worry about javascript, understand browser differences or css incompatibilities. It is all abstracted away from the developer who can focus on the end scenario without being distracted by these issues. All there is to see is XAML, XAML and more XAML and of course CSharp. I am up for that any day if I can get away from javascript. Why? Static language, with rich compiler support, intellisense, debugging support and a wide array of .NET apis to build on top of - need I say more? Our next project may have a lot more to do with &lt;A class="" title="Silverlight site" href="http://www.microsoft.com/silverlight/" mce_href="http://www.microsoft.com/silverlight/"&gt;Silverlight&lt;/A&gt;. Will it be a Silverlight Control Toolkit? May be. If you have ideas or suggestions around it do send me an email or leave a comment. &lt;/P&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=878813" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/kirtid/archive/tags/Toolkit/default.aspx">Toolkit</category><category domain="http://blogs.technet.com/kirtid/archive/tags/Silverlight/default.aspx">Silverlight</category><category domain="http://blogs.technet.com/kirtid/archive/tags/MIX/default.aspx">MIX</category></item></channel></rss>