Asp.net Updatepanel + Jquery UI对话框缺少标题问题
||
我有一个asp.net(3.5)页面,其中使用了一个重复页面和一个updatepanel,其中包含几个带有按钮和图标的重复器,这些重复器非常有效,直到我将其包裹起来。这是一个奇怪的问题,通过dilog可以完美地运行,但是在回发后无法显示对话框标题之后,其他一切都可以正常工作,它可以打开和关闭并显示我需要的信息。显然,这是由部分回发引起的,即使我正在重新绑定部分页面回发中的jquery事件,而我现在也处于松动状态。
$(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代码如下,其中包含嵌套的中继器-再次运行完美,但是我遇到的问题(对不起,有点混乱):
<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>
如果您有任何建议/意见或更好的做事方式,我将不胜感激。
干杯
没有找到相关结果
已邀请:
1 个回复
乐遣杀屎
至