asp.net mvc - x.BeginForm() and ViewData -


I have a scene where I initially used HTML. BeginForm () After posting, I show a message with ViewData ["Message"] It works fine.

When I turn to Ajax. Benefit (), Viewedata ["Message"] is zero.

What am I missing?

I think that when you use HTML Beniform Your administrator is re-presenting the current view, so the message will appear correctly in HTML.

When you make Ajax requests, it is up to you to decide what should be after success.

This Ajax Benefit can be done with the AJAX option parameter, where you can set the Javascript callback function on ons property.


Comments

Popular posts from this blog

c# - PInvoke of NetUserAdd returns 24 -

c# - XMLDocument.Validate Error: System.InvalidOperationException : The XmlSchemaSet on the document is either null or has no schemas in it -