在我的页面内部,有一个带有编辑按钮的网格。当我按下该按钮时,我必须获取其详细信息数据,然后在引导程序模版中显示这些详细信息。
首先让我向您展示模态,
<div id="template" class="modal fade ui-draggable ui-draggable-handle in" role="dialog" aria-hidden="true" tabindex="-1"
style="overflow-y: hidden; padding-left: 16px;">
<div class="modal-dialog setting-modal-dialog" style="width: 82% !important; margin-top: 2px !important;">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×
</span>
</button>
<h4 class="modal-title">Edit
</h4>
</div>
<div class="modal-body" style="padding: 0">
<div class="template-content" id="div01" style="">
<div id="divTemplateCreatesettings" class="fieldset01">
<table class="quiz-template-table">
<tbody>
<tr>
<td class="title">Header Text
</td>
<td class="title-data">
<asp:TextBox runat="server" ID="txtHeaderText" Width="326px" ClientIDMode="Static">
</asp:TextBox>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
现在让我向您展示我如何称呼这种模态,
protected void btnEdit_OnClick(object sender, EventArgs e){
//calling and displaying data..
// No issue here..
// calling Modal..
ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "key00",
"openModal('');",
true);
}
function openModal(sender, args) {
debugger;
$('#template').modal('show');
return false;
}
我已经解决了我的问题,
首先将模式内容包装在这样的更新面板中,
<div id="template" class="modal fade ui-draggable ui-draggable-handle in" role="dialog" aria-hidden="true" tabindex="-1"
style="overflow-y: hidden; padding-left: 16px;">
<div class="modal-dialog setting-modal-dialog" style="width: 82% !important; margin-top: 2px !important;">
<asp:UpdatePanel ID="upModal" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional">
<ContentTemplate>
// .. rest of the code..
<div class="modal-content">
和通话中
{
ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "key00",
"openModal('');",
true);
upModal.Update();
}
现在它将绑定数据,但是还有另一个问题,如果存在负责任何类型工作的脚本,现在将无法正常工作。因为:enter link description here
并且此链接将帮助您解决该问题。