0

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!

1
  • that's great news. Now could you please mark this as the correct answer by clicking on the tick. That was the next person knows the answer to your question. Thanks Commented Sep 19, 2010 at 7:12

1 Answer 1

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

thanks a lot griegs. I followed your directions and I got the solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.