2012-04-09 53 views
0

我要打電話與參數點擊按鈕調用一個MVC處理法參數

location.href = '<%: Url.Action("mAction", "mControl", "new {IDs='+selectedIDs+'}) %>'; 

location.href = '<%: Url.Action("mAction", "mControl", "new {IDs=123}) %>';

MVC的行動,我得到錯誤:

CS1010: Newline in constant

如何解決呢?

回答

4

你可以嘗試

location.href = '<%: Url.Action("mAction", "mControl", new {IDs=123}) %>'; 
之前怪報價