views:

80

answers:

1

I'd like to capture submit action from "Ajax.BeginForm (...)" and asynchronously fetch some data from controler and put it into some div...

How can i do it?

I've tried Ajax.BeginForm(..., new AjaxOption( UpdateTriggerId = "", ) but as i noticed it is used for online checking form or something like this...

How can i disable reload whole page while pressing "submit" ?? Mayby i have add something to controler?

Btw. What is better to use with forms (in AJAX context)? Pure Jquery or those Ajax.BeginForm?

A: 

You should be able to achieve what you need using Ajax.BeginForm and with a partial view...

http://davidhayden.com/blog/dave/archive/2009/05/19/ASPNETMVCAjaxBeginForm.aspx

Sohnee
I've tried do this, but after press submit, whole page reload and i see that partial View without masterpage.. So it still isn't asynchronous...
Simon
Can you share your view / master page. The most likely cause for this behaviour is that you haven't included the two scripts in your page, or that the paths to those scripts isn't quite right.
Sohnee
You were right :) I thought i've included Microsoft scripts. Thx again :)And btw what is it better to use Ajax helpers? or pure jquery and javascript functions in async interaction?
Simon
I prefer to write the AJAX with jQuery rather than the helpers, but that's just personal preference and there isn't a better way - just two different ways that suit different people!
Sohnee