1.通过ViewBag来传值。
@if (ViewBag.ReturnMessage != null)
2.脚本代码:
对话框设计与赋值问题。
<script type="text/javascript"> $(function () { if (document.getElementById("dialog-BorrowInformation") != null) { $.ligerDialog.open({ target: $("#dialog-BorrowInformation"), title: ‘温馨提示:“您有借款未还清,是否确定不冲账,继续提交。‘, height: 380, width: 840, buttons: [ { text: ‘继续提交‘, onclick: function (item, dialog) { $("#IsHintBorrowInformationCheck").val(true); $("#submitZD").click(); dialog.hide(); } }, { text: ‘取消‘, onclick: function (item, dialog) { dialog.hide(); } } ], isResize: true }); } if (document.getElementById("dialog-radioHintOfficialCardDeadlineMessage") != null) { $.ligerDialog.open({ target: $("#dialog-radioHintOfficialCardDeadlineMessage"), title: ‘警告‘, height: 200, width: 450, buttons: [{ text: ‘继续提交‘, onclick: function (item, dialog) { $("#IsHintOfficialCardDeadline").val(true); $("#submitZD").click(); dialog.hide(); } }, { text: ‘取消‘, onclick: function (item, dialog) { dialog.hide(); } }], isResize: true }); } }); </script>
3.动态网页的一些设计
@Html.Raw(@ViewBag.HintOfficialCardDeadlineMessage); @ViewContext.Writer.Write(rec.Agent); @ViewContext.Writer.Write(rec.Remark.Substring(0, 8) + "..");
时间: 2024-10-25 14:03:39