2010-12-01 48 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("'", @"\'") + "' }"; 

如果你想显示回传后的东西,然后做一些用户控件可见在您消息将被显示。

相关问题