开发者

How Can We get the Values of the Form without Post in asp.net MVC?

开发者 https://www.devze.com 2022-12-28 02:40 出处:网络
I Have Make a Create Form. & I want the Values in 开发者_如何学GoController how can I get them Without Postback the Whole Page?

I Have Make a Create Form. & I want the Values in 开发者_如何学GoController how can I get them Without Postback the Whole Page? Any article please help


You could use AJAX to send the form values to a controller action. The jQuery Form plugin is very good for this purpose. The plugin reads all the form values and sends them in an AJAX request to a controller action for processing.


Use javascript to call a web service (i.e ajax). Check out this article for some basics.


Since you're using the "postback" term I think you might be coming from a WebForms background which hides all the HTTP request-response cycle. POSTs are done on <form>s, so technically the entire page is not "posted back", but the data from the form in which the pressed resides.

0

精彩评论

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

关注公众号