<?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>My Work Around......</title><link>http://forums.asp.net/thread/1440389.aspx</link><pubDate>Wed, 25 Oct 2006 06:19:11 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1440389</guid><dc:creator>jodywbcb</dc:creator><author>jodywbcb</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1440389.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1008&amp;PostID=1440389</wfw:commentRss><description>&lt;p&gt;Not quite sure why this works....&lt;/p&gt;&lt;p&gt;I moved the UpdatePanel that contained the ModalPopup above the Update Panel that contains the gridview and associated UI interfaces.&amp;nbsp; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;When I place the AlwaysVisible and Progress control IN the UpdatePanel that contains the ModalPopUp - - suddenly - the gridview and DDLs remain once the the modal is closed.&amp;nbsp; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Without the AlwaysVisible and Progress Control - I still get the errors listed above.....(It could be one or the other (AlwaysVisible or Progress Control) I didn&amp;#39;t test to see if it work with one or the other... I was just shocked and amazed that this combination yielded what should of been expected results without them....&lt;/p&gt;&lt;p&gt;&lt;a href="http://tech-review.org/blogs/.net_2.0/archive/2006/10/24/66.aspx"&gt;Screenshots of the issue&amp;nbsp;and sample code are available here:&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: BUG: Using UpdatePanel.Update() with Modals causes loss of controls on core page. Example Code to Reproduce Provided</title><link>http://forums.asp.net/thread/1440141.aspx</link><pubDate>Wed, 25 Oct 2006 01:04:21 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1440141</guid><dc:creator>jodywbcb</dc:creator><author>jodywbcb</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1440141.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1008&amp;PostID=1440141</wfw:commentRss><description>&lt;p&gt;Bug is definately with the Modal Popup.&amp;nbsp; I removed all update panels and got the same behavior - except if Firefox - the gridview dissappears but the DDLs remain but in IE DDLs and Gridview dissapear on the modal popup show().&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Can someone just move this post over to the AjaxToolKitForum?&amp;nbsp; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: BUG: Using UpdatePanel.Update() with Modals causes loss of controls on core page. Example Code to Reproduce Provided</title><link>http://forums.asp.net/thread/1440030.aspx</link><pubDate>Tue, 24 Oct 2006 23:00:49 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1440030</guid><dc:creator>jodywbcb</dc:creator><author>jodywbcb</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1440030.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1008&amp;PostID=1440030</wfw:commentRss><description>&lt;p&gt;FollowUp testing...&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;1. I have tried using nested updated panels where the modal UpdatePanel was the &amp;#39;parent&amp;#39; and the gridview stuff was in a child UpdatePanel.&amp;nbsp; The ajax documentation on the documentation site listed all the examples for this so figured maybe that was problem...&lt;/p&gt;&lt;p&gt;2. Tried nested as above but reversed what was content.&lt;/p&gt;&lt;p&gt;3. Tried to wrap everything in one huge UpdatePanel.&lt;/p&gt;&lt;p&gt;4. Tried setting the properties for the UpdatePanel that wraps the gridview (which invokes the Modal UpdatePanel) as childrenastriggers = &amp;quot;false&amp;quot; and &amp;quot;true&amp;quot;&lt;/p&gt;&lt;p&gt;5. Removed all Update() from the code behind since the documentation&amp;nbsp;eludes that it is not necessary and automatically does it during the page life cycle (and I didn&amp;#39;t note the assertion errors by not doing as I did in the atlas versions)....&lt;/p&gt;&lt;p&gt;6. Forced update() on the UpdatePanel that contains the gridview before the show() of the modal popup...&lt;/p&gt;&lt;p&gt;Same results.....as detailed above...&lt;/p&gt;&lt;p&gt;Not quite sure how I can even remotedly work around this... This is the primary feature I need and only use.&amp;nbsp; &lt;/p&gt;&lt;p&gt;[Edited:] Modified the ModalBehavior.js to include:&lt;/p&gt;&lt;font size="2"&gt;&lt;p&gt;AjaxControlToolkit.ModalPopupBehavior.initializeBase(&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;font size="2"&gt;, [element]);&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;p&gt;&lt;font color="#008000" size="2"&gt;&lt;/font&gt;&lt;/p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;// Properties&lt;/font&gt;&lt;font size="2"&gt; &lt;p&gt;&lt;font color="#008000" size="2"&gt;//added by jody&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;font size="2"&gt;.registerPartialUpdateEvents();&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;p&gt;&lt;font size="2"&gt;-----&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;This allows when everything is wrapped in a single UpdatePanel - that the DDLs do not dissapear - however - the gridview I use does dissapear (in my custom control not posted)...&amp;nbsp; In the code example (first post)&amp;nbsp;its still an issue...using the included changes...&amp;nbsp;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Anyone with suggestions of at least a work around or confirm that I have identified this as a bug and its being looked at?&lt;/strong&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: BUG: Using UpdatePanel.Update() with Modals causes loss of controls on core page. Example Code to Reproduce Provided</title><link>http://forums.asp.net/thread/1439906.aspx</link><pubDate>Tue, 24 Oct 2006 21:05:10 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1439906</guid><dc:creator>jodywbcb</dc:creator><author>jodywbcb</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1439906.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1008&amp;PostID=1439906</wfw:commentRss><description>&lt;p&gt;Ok - I think I have it isolated and just need to search and see if there is a resolution for.&amp;nbsp; But in the scenario (code provided above - last updated with this post as well) - if the modal is invoked outside of the UpdatePanel it is in and the button invoking it is not inside any Update Panel - works as expected.&amp;nbsp; However if something invokes the Modal which is in UpdatePanel1 from UpdatePanel2 - this causes the loss of display of any databound objects (with exception of the gridview - the only time the gridview is lost (so to speak) is when its databound in codebehind ).....&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: BUG: Using UpdatePanel.Update() with Modals causes loss of controls on core page. Example Code to Reproduce Provided</title><link>http://forums.asp.net/thread/1439754.aspx</link><pubDate>Tue, 24 Oct 2006 19:05:07 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1439754</guid><dc:creator>jodywbcb</dc:creator><author>jodywbcb</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1439754.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1008&amp;PostID=1439754</wfw:commentRss><description>Additional Info: In my Complex Scenario I removed all references to the Update() - get the same symptoms... before I was always calling the Update() because I am loading controls dynamically and viewstate / control state used to get out of synch in the Atlas builds (which caused a bunch of assertion errors). In the new Ajax Beta / CTP / AjaxToolKit - I no longer get assertion errors by not calling the Update() - but the Modal still wipes out any databound controls such as gridviews, ddls, etc...</description></item><item><title>BUG: Using UpdatePanel.Update() with Modals causes loss of controls on core page. Example Code to Reproduce Provided</title><link>http://forums.asp.net/thread/1439733.aspx</link><pubDate>Tue, 24 Oct 2006 18:48:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1439733</guid><dc:creator>jodywbcb</dc:creator><author>jodywbcb</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1439733.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1008&amp;PostID=1439733</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;This simple example demonstrates the issue with ModalPopUps ancontrols dissapearing.&amp;nbsp; This is the code from the AJaxToolKit Sample Website - modified to demonstrate the issue.&amp;nbsp; When using Update() in code behind in conjunction with a ModalPopUp - the Update() process will cause controls on the original page to dissapear.&amp;nbsp; In a complex scenario - I even lose gridviews.&amp;nbsp; The code should be self explanatory.&amp;nbsp; The Modal is one update panel and the other UI is in a second update panel.&amp;nbsp; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a href="http://forums.asp.net/thread/1402183.aspx"&gt;This was an issue prior - David Anson provided this modification for the build of Atlas on 10-04-2006, 1:39 PM:&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Okay, thanks for the details. To make sure I&amp;#39;m understanding properly, I think that the following changes will make things work more as you&amp;#39;d like. Please let me know if this is progress or not.&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Add as the last two lines (before the closing &amp;#39;}&amp;#39;) of this.initialize in ModalPopupBehavior.js:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.registerPartialUpdateEvents();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.partialRenderingBegin.add(Function.createDelegate(this, this._onPartialRenderingBegin));&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;Add immediately following this.initialize (and immediately before this.dispose) in ModalPopupBehavior.js:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; this._onPartialRenderingBegin = function(sender, eventArgs) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.restoreTab();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/em&gt;&lt;/p&gt;&lt;p&gt;The fix did work - however it was never incorporated...But I am no longer confident that is directly the ModalPopUp as without ever calling the Update() the page works fine and controls are never lost.&amp;nbsp; Hence why I am posting this in this forum and not the toolkit.&lt;/p&gt;&lt;p&gt;Three additional buttons are added for demonstratation.&amp;nbsp; The labels should be self-explanatory. Buttons 1 - 3 are inside the UpdatePanel2 and Modal is in UpdatePanel1.&lt;/p&gt;&lt;p&gt;1. Button justs calls a modal update() in code behind.&amp;nbsp; This is to demontrate the issue is not necessarily with the calling of Update() from code in a non modal enviroment at least.&lt;/p&gt;&lt;p&gt;2. Button calls the Update() twice -again to verify&lt;/p&gt;&lt;p&gt;3. Button invokes the show() of the modal and does an update() to simulate loading of dynamic controls etc that may be inserted in the modal during &amp;#39;showtime&amp;#39;&lt;/p&gt;&lt;p&gt;a. 1st click - all seems normal - select something and close the modal&lt;/p&gt;&lt;p&gt;b &amp;nbsp;2nd click - all DDLs dissapear.&lt;/p&gt;&lt;p&gt;4. The last button is outside all update buttons and invokes the same event handler as in scenario#3.&amp;nbsp; However - with it being outside the update panel - no loss of controls.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="coloredcode"&gt;&lt;span class="dir"&gt;&amp;lt;%@ Page Language=&amp;quot;C#&amp;quot; MasterPageFile=&amp;quot;~/DefaultMaster.master&amp;quot; AutoEventWireup=&amp;quot;true&amp;quot; CodeFile=&amp;quot;ModalPopup.aspx.cs&amp;quot; Inherits=&amp;quot;ModalPopup_ModalPopup&amp;quot; Title=&amp;quot;ModalPopup Sample&amp;quot; %&amp;gt;

&amp;lt;%@ Register Assembly=&amp;quot;AjaxControlToolkit&amp;quot; Namespace=&amp;quot;AjaxControlToolkit&amp;quot; TagPrefix=&amp;quot;ajaxToolkit&amp;quot; %&amp;gt;
&amp;lt;%@ Register Assembly=&amp;quot;Microsoft.Web.Preview&amp;quot; Namespace=&amp;quot;Microsoft.Web.UI.Controls&amp;quot; TagPrefix=&amp;quot;ajax&amp;quot; %&amp;gt;

&amp;lt;%@ Register Assembly=&amp;quot;Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35&amp;quot;
    Namespace=&amp;quot;Microsoft.Web.UI&amp;quot; TagPrefix=&amp;quot;ajax&amp;quot; %&amp;gt;&lt;/span&gt;
&amp;lt;&lt;span class="tag"&gt;asp:Content&lt;/span&gt;&lt;span class="attr"&gt; ID=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Content1&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; ContentPlaceHolderID=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;ContentPlaceHolder1&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; Runat=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Server&amp;quot;&lt;/span&gt;&amp;gt;

    &amp;lt;&lt;span class="tag"&gt;asp:ScriptManager&lt;/span&gt;&lt;span class="attr"&gt; id=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;ScriptManager&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; runat=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="tag"&gt;asp:ScriptManager&lt;/span&gt;&amp;gt;

    &amp;lt;&lt;span class="tag"&gt;div&lt;/span&gt;&lt;span class="attr"&gt; class=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;demoarea&amp;quot;&lt;/span&gt;&amp;gt;
    &amp;lt;&lt;span class="tag"&gt;div&lt;/span&gt;&lt;span class="attr"&gt; class=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;demoheading&amp;quot;&lt;/span&gt;&amp;gt;ModalPopup Demonstration&amp;lt;/&lt;span class="tag"&gt;div&lt;/span&gt;&amp;gt;
    &amp;lt;&lt;span class="tag"&gt;p&lt;/span&gt;&lt;span class="attr"&gt; id=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Paragraph1&amp;quot;&lt;/span&gt;&amp;gt;&lt;span class="dir"&gt;&amp;lt;%=&lt;/span&gt; GetContentFillerText()&lt;span class="dir"&gt;%&amp;gt;&lt;/span&gt;&amp;lt;/&lt;span class="tag"&gt;p&lt;/span&gt;&amp;gt;
    &amp;lt;&lt;span class="tag"&gt;br&lt;/span&gt; /&amp;gt;


    &amp;lt;&lt;span class="tag"&gt;script&lt;/span&gt;&lt;span class="attr"&gt; type=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&amp;gt;
    var styleToSelect;
    function onOk() {
        $get(&amp;#39;Paragraph1&amp;#39;).className = styleToSelect;
    }
    &amp;lt;/&lt;span class="tag"&gt;script&lt;/span&gt;&amp;gt;
      &amp;lt;/&lt;span class="tag"&gt;div&lt;/span&gt;&amp;gt;
    &amp;lt;&lt;span class="tag"&gt;asp:UpdatePanel&lt;/span&gt;&lt;span class="attr"&gt; ID=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;UpdatePanel1&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; UpdateMode=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Conditional&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt;  runat=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;server&amp;quot;&lt;/span&gt; &amp;gt;
    &amp;lt;&lt;span class="tag"&gt;ContentTemplate&lt;/span&gt;&amp;gt;
       Sort By: &amp;lt;&lt;span class="tag"&gt;asp:DropDownList&lt;/span&gt;&lt;span class="attr"&gt; id=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;dropSortBy&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; AutoPostBack=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;True&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; Runat=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Server&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; Visible=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;true&amp;quot;&lt;/span&gt;&amp;gt;
                    &amp;lt;&lt;span class="tag"&gt;asp:ListItem&lt;/span&gt;&lt;span class="attr"&gt; Text=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Named Page ID&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; Value=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;0&amp;quot;&lt;/span&gt; /&amp;gt;
                    &amp;lt;&lt;span class="tag"&gt;asp:ListItem&lt;/span&gt;&lt;span class="attr"&gt; Text=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Grouping&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; Value=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;2&amp;quot;&lt;/span&gt; /&amp;gt;
                    &amp;lt;&lt;span class="tag"&gt;asp:ListItem&lt;/span&gt;&lt;span class="attr"&gt; Text=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Community&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; Value=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;3&amp;quot;&lt;/span&gt; /&amp;gt;
                    
                
                &amp;lt;/&lt;span class="tag"&gt;asp:DropDownList&lt;/span&gt;&amp;gt; Order By: &amp;lt;&lt;span class="tag"&gt;asp:DropDownList&lt;/span&gt;&lt;span class="attr"&gt; id=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;dropOrderBy&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; AutoPostBack=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;True&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; Runat=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Server&amp;quot;&lt;/span&gt;&amp;gt;
                    &amp;lt;&lt;span class="tag"&gt;asp:ListItem&lt;/span&gt;&lt;span class="attr"&gt; Text=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Descending&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; value=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;0&amp;quot;&lt;/span&gt; /&amp;gt;
                    &amp;lt;&lt;span class="tag"&gt;asp:ListItem&lt;/span&gt;&lt;span class="attr"&gt; Text=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Ascending&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; value=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;1&amp;quot;&lt;/span&gt; /&amp;gt;
                    
                &amp;lt;/&lt;span class="tag"&gt;asp:DropDownList&lt;/span&gt;&amp;gt; 
                &amp;lt;/&lt;span class="tag"&gt;br&lt;/span&gt;&amp;gt;
                &amp;lt;&lt;span class="tag"&gt;asp:GridView&lt;/span&gt;&lt;span class="attr"&gt; id=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;myGrid&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; runat=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; DataSourceID=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;xml1&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; AutoGenerateColumns=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;True&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; AllowPaging=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;True&amp;quot;&lt;/span&gt;&amp;gt;
&amp;lt;/&lt;span class="tag"&gt;asp:GridView&lt;/span&gt;&amp;gt;
&amp;lt;&lt;span class="tag"&gt;asp:XmlDataSource&lt;/span&gt;&lt;span class="attr"&gt; ID=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;xml1&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; runat=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; DataFile=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;~/App_Data/CarsService.xml&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; XPath=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;/CarsService/make&amp;quot;&lt;/span&gt; /&amp;gt;



&amp;lt;/&lt;span class="tag"&gt;br&lt;/span&gt;&amp;gt;
&amp;lt;/&lt;span class="tag"&gt;ContentTemplate&lt;/span&gt;&amp;gt;
    &amp;lt;/&lt;span class="tag"&gt;asp:UpdatePanel&lt;/span&gt;&amp;gt; 
    
      &amp;lt;&lt;span class="tag"&gt;asp:UpdatePanel&lt;/span&gt;&lt;span class="attr"&gt; ID=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;UpdatePanel2&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; UpdateMode=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Conditional&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt;  runat=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;server&amp;quot;&lt;/span&gt; &amp;gt;
    &amp;lt;&lt;span class="tag"&gt;ContentTemplate&lt;/span&gt;&amp;gt;
&amp;lt;&lt;span class="tag"&gt;asp:Panel&lt;/span&gt;&lt;span class="attr"&gt; style=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;DISPLAY: none&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; id=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Panel1&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; runat=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; CssClass=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;modalPopup&amp;quot;&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span class="tag"&gt;p&lt;/span&gt;&amp;gt;Choose the paragraph style you would like:&amp;lt;/&lt;span class="tag"&gt;p&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span class="tag"&gt;p&lt;/span&gt; &amp;gt;&amp;lt;&lt;span class="tag"&gt;input&lt;/span&gt;&lt;span class="attr"&gt; type=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;radio&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; name=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Radio&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; id=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;RadioA&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; onclick=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;styleToSelect = &amp;#39;sampleStyleA&amp;#39;;&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; checked=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;checked&amp;quot;&lt;/span&gt; /&amp;gt;&amp;lt;&lt;span class="tag"&gt;label&lt;/span&gt;&lt;span class="attr"&gt; for=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;RadioA&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; class=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;sampleStyleA&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; style=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;padding:3px;&amp;quot;&lt;/span&gt;&amp;gt;Sample paragraph text&amp;lt;/&lt;span class="tag"&gt;label&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="tag"&gt;p&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span class="tag"&gt;p&lt;/span&gt; &amp;gt;&amp;lt;&lt;span class="tag"&gt;input&lt;/span&gt;&lt;span class="attr"&gt; type=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;radio&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; name=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Radio&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; id=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;RadioB&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; onclick=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;styleToSelect = &amp;#39;sampleStyleB&amp;#39;;&amp;quot;&lt;/span&gt; /&amp;gt;&amp;lt;&lt;span class="tag"&gt;label&lt;/span&gt;&lt;span class="attr"&gt; for=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;RadioB&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; class=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;sampleStyleB&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; style=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;padding:3px;&amp;quot;&lt;/span&gt;&amp;gt;Sample paragraph text&amp;lt;/&lt;span class="tag"&gt;label&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="tag"&gt;p&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span class="tag"&gt;p&lt;/span&gt; &amp;gt;&amp;lt;&lt;span class="tag"&gt;input&lt;/span&gt;&lt;span class="attr"&gt; type=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;radio&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; name=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Radio&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; id=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;RadioC&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; onclick=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;styleToSelect = &amp;#39;sampleStyleC&amp;#39;;&amp;quot;&lt;/span&gt; /&amp;gt;&amp;lt;&lt;span class="tag"&gt;label&lt;/span&gt;&lt;span class="attr"&gt; for=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;RadioC&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; class=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;sampleStyleC&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; style=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;padding:3px;&amp;quot;&lt;/span&gt;&amp;gt;Sample paragraph text&amp;lt;/&lt;span class="tag"&gt;label&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="tag"&gt;p&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span class="tag"&gt;p&lt;/span&gt; &amp;gt;&amp;lt;&lt;span class="tag"&gt;input&lt;/span&gt;&lt;span class="attr"&gt; type=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;radio&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; name=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Radio&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; id=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;RadioD&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; onclick=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;styleToSelect = &amp;#39;sampleStyleD&amp;#39;;&amp;quot;&lt;/span&gt; /&amp;gt;&amp;lt;&lt;span class="tag"&gt;label&lt;/span&gt;&lt;span class="attr"&gt; for=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;RadioD&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; class=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;sampleStyleD&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; style=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;padding:3px;&amp;quot;&lt;/span&gt;&amp;gt;Sample paragraph text&amp;lt;/&lt;span class="tag"&gt;label&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="tag"&gt;p&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span class="tag"&gt;p&lt;/span&gt;&lt;span class="attr"&gt; style=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;text-align:center;&amp;quot;&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span class="tag"&gt;asp:Button&lt;/span&gt;&lt;span class="attr"&gt; ID=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;OkButton&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; runat=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; Text=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;OK&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="tag"&gt;asp:Button&lt;/span&gt;&amp;gt;
        &amp;lt;&lt;span class="tag"&gt;asp:Button&lt;/span&gt;&lt;span class="attr"&gt; ID=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;CancelButton&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; runat=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; Text=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;Cancel&amp;quot;&lt;/span&gt;&amp;gt;&amp;lt;/&lt;span class="tag"&gt;asp:Button&lt;/span&gt;&amp;gt;
        &amp;lt;/&lt;span class="tag"&gt;p&lt;/span&gt;&amp;gt;
    &lt;font size="2"&gt;&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#800000" size="2"&gt;Panel&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;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="#800000" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#800000" size="2"&gt;LinkButton&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;LinkButton1&amp;quot;&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;Text&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;Click here to change the paragraph style&amp;quot;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#800000" size="2"&gt;LinkButton&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000" size="2"&gt;br&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000" size="2"&gt;br&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;These buttons are all in UpdatePanel #2&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000" size="2"&gt;br&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#800000" size="2"&gt;Button&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;btnHide&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;text&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;do just Update()&amp;quot;&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;OnClick&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;btnHide_Click&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;/&amp;gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000" size="2"&gt;br&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#800000" size="2"&gt;Button&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;btnHide2&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;text&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;Perform multiple Update()&amp;quot;&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;OnClick&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;btnHide_Click2&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;/&amp;gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000" size="2"&gt;br&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;p&gt;First click works fine, second click : databound objects dissappear(gridviews bound in code behind - in this example the gridview will always show but if populated in code behind would dissappear.) See the dropdownlists dissappear.&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000" size="2"&gt;br&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#800000" size="2"&gt;Button&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;btnModal&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;text&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;Show Modal and do Update()&amp;quot;&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;OnClick&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;btnShow_Click&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;/&amp;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="#800000" size="2"&gt;br&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000" size="2"&gt;ajaxToolkit&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#800000" size="2"&gt;ModalPopupExtender&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;ModalPopupExtender&amp;quot;&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;CancelControlID&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;CancelButton&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;OnOkScript&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;onOk()&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;OkControlID&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;OkButton&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;DropShadow&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;true&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;BackgroundCssClass&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;modalBackground&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;PopupControlID&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;Panel1&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;TargetControlID&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;LinkButton1&amp;quot;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000" size="2"&gt;ajaxToolkit&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#800000" size="2"&gt;ModalPopupExtender&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;p&gt;&amp;lt;/&lt;font color="#800000" size="2"&gt;ContentTemplate&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#800000" size="2"&gt;UpdatePanel&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;p&gt;This is outside the Update Panels and it works...&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000" size="2"&gt;br&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#800000" size="2"&gt;Button&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;Button1&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;text&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;Show Modal and do Update()Outside the Update Panels&amp;quot;&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;OnClick&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;btnShow_Click&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;/&amp;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="#800000" size="2"&gt;br&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#800000" size="2"&gt;div&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;class&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&amp;quot;demobottom&amp;quot;&amp;gt;&amp;lt;/&lt;/font&gt;&lt;font color="#800000" size="2"&gt;div&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;p&gt;&amp;lt;/&lt;font color="#800000" size="2"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;:&lt;/font&gt;&lt;font color="#800000" size="2"&gt;Content&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;
--------------------------------------------------------------------------------
Colorized by: CarlosAg.CodeColorizer &lt;/pre&gt;&amp;nbsp;&amp;nbsp;&lt;pre class="coloredcode"&gt;&lt;span class="cmt"&gt;// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Permissive License.
// See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx.
// All other rights reserved.&lt;/span&gt;


&lt;span class="kwd"&gt;using&lt;/span&gt; System;
&lt;span class="kwd"&gt;using&lt;/span&gt; System.Data;
&lt;span class="kwd"&gt;using&lt;/span&gt; System.Configuration;
&lt;span class="kwd"&gt;using&lt;/span&gt; System.Collections;
&lt;span class="kwd"&gt;using&lt;/span&gt; System.Web;
&lt;span class="kwd"&gt;using&lt;/span&gt; System.Web.Security;
&lt;span class="kwd"&gt;using&lt;/span&gt; System.Web.UI;
&lt;span class="kwd"&gt;using&lt;/span&gt; System.Web.UI.WebControls;
&lt;span class="kwd"&gt;using&lt;/span&gt; System.Web.UI.WebControls.WebParts;
&lt;span class="kwd"&gt;using&lt;/span&gt; System.Web.UI.HtmlControls;

&lt;span class="kwd"&gt;public&lt;/span&gt; partial &lt;span class="kwd"&gt;class&lt;/span&gt; ModalPopup_ModalPopup : CommonPage
{

    &lt;span class="kwd"&gt;protected void&lt;/span&gt; Page_Load(&lt;span class="kwd"&gt;object&lt;/span&gt; sender, EventArgs e)
    {

    }
    &lt;span class="kwd"&gt;protected void&lt;/span&gt; btnShow_Click(&lt;span class="kwd"&gt;object&lt;/span&gt; sender, EventArgs e)
    {
        UpdatePanel1.Update();
        ModalPopupExtender.Show();
    }
    &lt;span class="kwd"&gt;protected void&lt;/span&gt; btnHide_Click(&lt;span class="kwd"&gt;object&lt;/span&gt; sender, EventArgs e)
    {
        UpdatePanel1.Update();
    }
    &lt;span class="kwd"&gt;protected void&lt;/span&gt; btnHide_Click2(&lt;span class="kwd"&gt;object&lt;/span&gt; sender, EventArgs e)
    {
        UpdatePanel1.Update();
        UpdatePanel1.Update();
    }
}
&lt;/pre&gt;&amp;nbsp;</description></item></channel></rss>