开发者

ui-dialog open event executed from a .net mvc controller action

If I want to use a jquery dialog in order to display an error message 开发者_如何学编程submited from a .net mvc controller action, what I have to do? could you give me an example?

thanks a lot for helping!


in the controller i'd be setting a value of a hidden field and checking that with jquery and if you find that you need to show it then show it and reset the hidden field value.

$(document).ready(function(){
  var showDlg = $('#myHiddenField').val();
  if (showDlg != "")
    //show dialog
});

Don't forget that the value needs to be part of the model you pass back to the view. For this you would need to implement a FormViewModel I think.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜