1
我有一个使用重复和一个更新面板的asp.net(3.5)页面,其中包含几个带按钮和图标的中继器,直到我将它包裹起来为止。这是一个奇怪的问题,由dilog完美工作,但回发后未能显示对话标题,一切工作正常打开和关闭,并显示我需要它的信息。这显然是由部分回发引起的,尽管我在部分页面回发内重新绑定了jquery事件,而现在我处于一个懒散的状态。Asp.net Updatepanel + Jquery UI对话框缺失标题问题
$(document).ready(function() {
$('*[id*=dialog-ExtRef]').dialog({
modal: false,
resizable: false,
minWidth: 500,
autoOpen: false,
buttons: {Ok: function() { $(this).dialog("close");}}
});
$('*[id*=ExtRefLink]').click(function() {
var targetDialog = $(this).attr("func")
var x = ($("#mainBody").outerWidth() + 20)/2 - 250;
var y = $(this).position().top - $(document).scrollTop() + 10;
$("#" + targetDialog + "").dialog("open").dialog('option', 'position', [x, y]);
});
});
上述工作完美+我的对话框按预期打开。
相同的代码也被包裹在更新面板模板中:
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function (evt, args) {
//CUTOUT
}
我的HTML/asp.net代码是用于对话框如下,包含嵌套中继器 - 再次执行完美,但这个问题我“M体验(有点不好意思乱):
<ItemTemplate>
<div class="categoryHeader ui-widget-header"><asp:Label ID="lblCategoryName" runat="server" Text='<%# Bind("param_Value") %>'></asp:Label><asp:Label ID="lblCategoryID" runat="server" Text='<%# Bind("param_ID") %>' CssClass="hidden"></asp:Label></div>
<div class="categoryBody">
<asp:Repeater ID="rpSubCategory" runat="server" >
<ItemTemplate>
<div style="width:auto; padding:5px 5px 5px 5px;">
<table style="width:100%;" cellpadding="4" cellspacing="0"><tr>
<td style="width:5%;"><asp:LinkButton ID="delRequest" CommandArgument='<%# Bind("req_identifier") %>' runat="server">Delete Request</asp:LinkButton></td>
<td style="width:45%;"><asp:LinkButton ID="lnkViewRequest"
CommandArgument='<%# Bind("ass_ID") %>' runat="server"
Text='<%# Bind("req_headline") %>'></asp:LinkButton><br />Currently with: <asp:Label ID="Label1" CssClass="infoItem" runat="server" Text='<%# Convert.ToString(Eval("assigned_To")).ToUpper() %>'></asp:Label> since: <asp:Label ID="Label2" CssClass="infoItem" runat="server" Text='<%# Bind("req_Date","{0:dd/MM/yyyy}") %>'></asp:Label></td>
<td style="width:30%;"><asp:Label ID="Label5" runat="server" Text='<%# Bind("req_Priority","Priority: {0}") %>'></asp:Label><br /><asp:Label ID="Label6" runat="server" Text='<%# Bind("req_Status","Status: {0}") %>'></asp:Label></td>
<td style="width:20%; text-align:right;">
<div id='<%# Eval("ass_ID","NoteLink{0}") %>' func='<%# Eval("ass_ID","dialog-message{0}") %>' class="divLink"><asp:Image ID="noteImage" runat="server" ImageUrl="~/Image/note.png" ToolTip="Request Note Quick View" /></div>
<div id='<%# Eval("ass_ID","dialog-message{0}") %>' title="Quick View - Request Notes">
<p>
<asp:Label ID="lblID" Visible="false" runat="server" Text='<%# Eval("req_identifier") %>'></asp:Label>
<asp:ObjectDataSource ID="ObjectDataSource3" runat="server"
SelectMethod="getNotesTableByRequest" TypeName="derby.prototype.requestNotes">
<SelectParameters>
<asp:ControlParameter ControlID="lblID" Name="requestID"
PropertyName="Text" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:Repeater ID="Repeater1" runat="server" DataSourceID="ObjectDataSource3">
<ItemTemplate>d<br /></ItemTemplate>
</asp:Repeater>
</p>
</div>
<div id='<%# Eval("ass_ID","ExtRefLink{0}") %>' func='<%# Eval("ass_ID","dialog-ExtRef{0}") %>' class="divLink" ><asp:Image ID="refImage" runat="server" ImageUrl="~/Image/world_go.png" ToolTip="External Reference Quick View" /></div>
<div id='<%# Eval("ass_ID","dialog-ExtRef{0}") %>' title="Quick View - External References">
<p>
<asp:ObjectDataSource ID="ObjectDataSource4" runat="server"
SelectMethod="getReferencesTableByRequest"
TypeName="derby.prototype.requestReferences">
<SelectParameters>
<asp:ControlParameter ControlID="lblID" Name="requestID"
PropertyName="Text" Type="String" />
</SelectParameters>
</asp:ObjectDataSource>
<asp:Repeater ID="Repeater2" runat="server" DataSourceID="ObjectDataSource4">
<ItemTemplate>d<br /></ItemTemplate>
</asp:Repeater>
</p>
</div>
</td>
</tr></table></div>
<asp:Label ID="Label4" CssClass="hidden" runat="server" Text='<%# Bind("req_Priority","Priority: {0}") %>'></asp:Label><asp:Label ID="Label3" CssClass="hidden" runat="server" Text='<%# Bind("req_Status") %>'></asp:Label> <asp:Label ID="lblIsNew" CssClass="hidden" runat="server" Text='<%# Bind("isNew") %>'></asp:Label>
我会很感激听到,如果任何人有任何建议/意见或更好的做事方法。
干杯
还是同样的问题,其他一切工作确定与对话,只是标题失踪。 – 2011-06-16 08:47:17