我的javascript方法中有以下代码。
$("#a").click (function() {
//bla bla....
success: function (data) {
var intType = 1;
var strURL = '<%= Url.Action("actionName", "controller") %>' + '/' + intType;
$.getJSON(strURL, null, function (rpt) {
var fName = rpt.name;
var guidID = rpt.ID;
//alert("I am here after JSON callback. this is my filename " + guidRptFileID);
$('#Rptfile').append('<div id="form_files_1" style="cursor: default;"><span style="float: left; color: #a90000;"> ' + fileName + '</span><span><%: Html.ActionLink("Remove", "RemoveAccessData", "ReportGenerator", new {id = ' + guidID + ' }, new { @style = "float:right;color:#a90000; text-decoration: none; cursor:pointer;", @class = "button-delete" })%></span></div>');
});
},
error: function (data, status, e) {
alert(e);
}
});
return false;
});
</script>
$('#Rptfile')
- &gt;这是我的div标签,它可以正常工作。但是我的html.actionlink是这样的。
<%: Html.ActionLink("Link", "actionName", "controller", new { id = Modal.ID }, new { @style = "float:right;color:#a90000; text-decoration: none; cursor:pointer;", @class = "button-delete" })%>.
如果我追加这个我收到错误编译器错误消息:CS1012:字符文字中的字符过多