Click here to Skip to main content
15,881,204 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi Developers,

Am creating one MVC4 application.I used to add ajax using update panel and script amanger in aspx pages. But i dont know how to do that in MVC razor. Can anyone help me on this?

My requirement is:
I have one create user section when the user clicks on create, create user process should happen asynchronously.It should add the user without reloading.

How do i do this aspx:
script manager
update panel
-----Create user-----
Close update panel
HTML
<script manager>
<updtepanel>
create user
</update panel>

How do i do this in MVC : thats my question.
Posted

1 solution

You can just use jQuery's ajax method, or if you want to use the ajax framework that comes with MVC then you ues the ajax helper

http://www.dotnet-stuff.com/tutorials/aspnet-mvc/understanding-ajax-helpers-in-asp-net-mvc[^]

To call your action methods use Ajax.ActionLink

https://msdn.microsoft.com/en-us/library/dd493106(v=vs.118).aspx[^]

To create an ajax form use Ajax.BeginForm

https://msdn.microsoft.com/en-us/library/system.web.mvc.ajax.ajaxextensions.beginform(v=vs.118).aspx[^]

If you google you should find examples and tutorials on how to use these.
 
Share this answer
 
Comments
Am Gayathri 6-Apr-15 5:31am    
Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900