2010-12-01 77 views
0

我正在使用MVC和使用jquery.jeditable插件。編輯工作正常在grid.when我更新網格內容&點擊進入編輯帖子從我的控制器cllass被稱爲&返回一個字符串作爲更新文本。從jeditable插件編輯後在頁面上顯示消息

我想在更新完成後在我的頁面的其他地方顯示一條消息。

[HttpPost]public string edit(FormCollection collection) 

{..... 

// show success message on page other then grid column 

... return <updated column value>; 

} 

回答

0

如果你說的是在ajax調用之後顯示一條消息,那麼就直接顯示它;)什麼是問題?

// variant 1: 
alert(response); 
// variant 2: 
$.growlUI("Server response", response); // using blockUI plugin 

// or any other popup div with the information from ajax http request 

如果返回多個值,然後返回它們作爲一個JSON對象,像這樣:

return "{ updatedColumnValue: " + value + ", msgtext: '" + msgtext.Replace("'", @"\'") + "' }"; 

如果你想顯示回傳後的東西,然後做一些用戶控件可見在您消息將被顯示。

相關問題