0

你如何将数据传递给 jqModal?例如,当单击 Button2 时,我可以传递按钮的 id 或隐藏字段并让控制器拾取它吗?

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<script type="text/javascript">

    $(document).ready(function() {
        $('#title').css('background-color', 'red');
        $('#dialog').jqm({ trigger: '.Button2', ajax: "/Home/AddAssignment" });
    });

</script>

    <h2 id="title">Index</h2>
    <div id="dialog" class="jqmWindow">This is a dialog window</div>
        <a class="Button2" id="Button2">Test</a>
    <div id="someDiv">some div</div>

</asp:Content>

谢谢,罗德查

4

1 回答 1

0
$.post("/Articles/jQueryAddComment", { commentText: commentText, id: id, type: commentType },function.....

我像这样调用我的控制器,然后传递参数,如上所示。

如果要将 id 传递给控制器​​,可以使用 this.id。

这是你所追求的还是我不在基地?

于 2009-09-24T21:55:25.073 回答