Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>That looks like it should work. Make sure you are putting a <code>&lt;asp:ScriptManager /&gt;</code> control on your page (or RadScriptManager if you are using Telerik, ToolkitScriptManager if you are using Microsoft's AjaxToolkit, etc.) </p> <p><strong>EDIT:</strong> Following is code that works correctly using <code>UpdatePanel</code> and the Bootstrap modal dialog you mentioned:</p> <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="bootstrap.aspx.cs" Inherits="TestWeb.bootstrap" %&gt; &lt;!DOCTYPE html&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head&gt; &lt;title&gt;&lt;/title&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt; &lt;link href="css/bootstrap.min.css" rel="stylesheet" media="screen"&gt; &lt;link rel="stylesheet" href="css/bootstrap-theme.min.css"&gt; &lt;script src="Scripts/jquery-1.8.2.js"&gt;&lt;/script&gt; &lt;script src="js/bootstrap.min.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;form id="form1" runat="server"&gt; &lt;asp:ScriptManager ID="ScriptManager1" runat="server" /&gt; &lt;a data-toggle="modal" href="#myModal" class="btn btn-primary btn-lg"&gt;Launch demo modal&lt;/a&gt; &lt;div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"&gt; &lt;div class="modal-dialog"&gt; &lt;div class="modal-content"&gt; &lt;div class="modal-header"&gt; &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;&amp;times;&lt;/button&gt; &lt;h4 class="modal-title"&gt;Modal title&lt;/h4&gt; &lt;/div&gt; &lt;div class="modal-body"&gt; &lt;asp:UpdatePanel ID="upd" runat="server" UpdateMode="Conditional"&gt; &lt;ContentTemplate&gt; &lt;asp:PlaceHolder id="p1" runat="server"&gt; &lt;asp:Literal id="lit1" runat="server" Text="Placeholder 1" /&gt; &lt;/asp:PlaceHolder&gt; &lt;asp:PlaceHolder id="p2" runat="server" visible="false"&gt; &lt;asp:Literal id="lit2" runat="server" Text="Placeholder 2" /&gt; &lt;/asp:PlaceHolder&gt; &lt;/ContentTemplate&gt; &lt;Triggers&gt; &lt;asp:AsyncPostBackTrigger ControlID="btn" EventName="Click" /&gt; &lt;/Triggers&gt; &lt;/asp:UpdatePanel&gt; &lt;/div&gt; &lt;div class="modal-footer"&gt; &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt; &lt;asp:Button ID="btn" runat="server" CssClass="btn btn-primary" Text="Save" OnClick="btn_Click" /&gt; &lt;/div&gt; &lt;/div&gt;&lt;!-- /.modal-content --&gt; &lt;/div&gt;&lt;!-- /.modal-dialog --&gt; &lt;/div&gt;&lt;!-- /.modal --&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>And in the code-behind:</p> <pre><code>protected void btn_Click(object sender, EventArgs e) { this.p1.Visible = false; this.p2.Visible = true; } </code></pre> <p>I would encourage you to create a test page in your app with just this markup to confirm that it works in your environment. Assuming it does, then I would take your problematic code and start pulling pieces out. Maybe put same plain text in the second <code>Placeholder</code> control instead of a couple of styled divs and a <code>Literal</code> that pulls its text from a resource file. Comment out your data update code so that all your Save button is doing is toggling visibility on the two <code>Placeholder</code> controls. If you still can't get it to work after stripping your page down to the bare minimum, then post more of your code and I'll take another look.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload