我想知道是否有办法做webforms的东西..或者一个很好的方法来做到这一点.. 我有我的“索引”视图上的ActionLink(“foo”,“fooAction”)。在这个函数中,我调用一个返回“True”或“False”的方法,并且根据返回结果,我必须给用户一些反馈,并返回具有相同结果和反馈的“索引”。麻烦与动作链接
在webforms中,我们只需在该方法上设置“label.visible = true; | label.text ='bla'”或w/e。
我清楚吗? 谢谢!
编辑:
一些伪我会做使用web表单更好地说明:
<asp:button OnCommand="method1">
- Method1(){
var response = ws.MethodFromWebService(); //call a method from the Web Service and get the return(true/false)
if (response)
feedbackLabel.Text = "worked";
else
feedbackLabel.Text = "didn't work";
feedbackLabel.Visible = true;
}
我想要做的,没有的JavaScript。
有点困惑。所以你想传递一个true或false到你的Controller Action? – 2010-04-19 15:17:34
是的,没有改变视图的结果.. – Daniel 2010-04-19 15:56:05