DetailsView의 위 버튼이 있습니다. 그것을 클릭하면 "Insert Note"대화 상자 (iframe의 다른 페이지)가 팝업되고,이 대화 상자는 Jquery를 사용하고 있습니다. 대화 상자 팝업의이 삽입 페이지에 recordID를 전달하는 방법을 모르겠습니다.RecordID를 Jquery UI 대화 상자에 전달
jQuery 코드는 :
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.ui/1.8.6/jquery-ui.min.js"></script>
<link type="text/css" rel="Stylesheet" href="http://ajax.microsoft.com/ajax/jquery.ui/1.8.6/themes/smoothness/jquery-ui.css">
<script type="text/javascript">
$(document).ready(function() {
$('#AddNewProposal').live('click', function (e) {
e.preventDefault();
var page = $(this).attr("href")
//var page = "ProposalCreateNew.aspx"
var pagetitle = $(this).attr("title")
alert(page);
var $dialog = $('<div></div>')
.html('<iframe style="border: 0px; " src="' + page + '" width="100%" height="100%" frameBorder="0" align="middle"> ></iframe>')
.dialog({
autoOpen: false,
modal: true,
height: 650,
width: 900,
title: pagetitle
});
$dialog.dialog('open');
});
});
</script>
나는 이것을 시도했다, 그러나 그것은 오류
<table width="80%" align="center" >
<tr>
<td width="20%"></td>
<td width="80%" class="PageTitle"></td>
<td width="20%">
<asp:Button runat="server" CommandName="AddNewProposal" ID="AddNewProposal" Text="Create New" href="ProposalCreateNote.aspx" title="Create Note" class="button3"/>
</td>
</tr>
</table
--- Below is my DetailsView which has a label to display the ProposalID, so I want to grab this ID and pass it to the dialog box (URL + ID) when I click the AddNewProposal button.
<asp:TemplateField HeaderText="ProposedID" SortExpression="Name" >
<ItemTemplate >
<asp:Label ID="ProposalID" runat="Server"
style="text-align:left;" Text='<%# Eval("ProposedID")%>' />
</ItemTemplate>
</asp:TemplateField>
가 도와주세요 "서버 태그> <% ... %를 포함 할 수 없습니다"제공합니다. 미리 감사드립니다. 이 같은 해당 텍스트를 얻을 수 있어야하므로
누구든지 어떤 의견이 있습니까? – Milacay