What's the recommended way to display errors from JavaScript (jQuery) in ASP.NET MVC 3 views? -
I submit a form to my ASP.NET MVC 3 server via a JavaScript handler (I use jQuery) Do I get an error and response to another Javascript handler, am I thinking that I should display such visual messages, which would have to be presented as a result? I like to use some standard ASP.NET MVC 3 phrases / constructions.
Edit Note that I want to display an error message from the server, in a Javascript error handler function received. You can go through a pure MVC method: "Client-side valuation Enable "to scroll down. In your view, you will have code that looks like this: UPDATE Messages are interested in OP customs. No MVC is built for this kind of custom messaging. The best bet is to just create your own message area and write messages in your callback function. It should not be too complicated!
@ Html.TextBoxFor (model = & gt (model => model.UserName)
$. Ajax (..., function) { Attachments ('& lt; p & gt; + + + +' & lt; / p & gt; ';)}); < / Html>
Comments
Post a Comment