我想知道是否有辦法做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