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