views:

50

answers:

1

I am using ajax in mvc for partial page refresh.

I create a partial view (ie a seperate user control) for each page and then call partial view by using Html.RenderPartial().

I just want to confirm that do I need to create a seperate user control for every page or is there any other way?

Any suggestions would be greatly appreciated.

+2  A: 

You should create a separate user control for each logical unit that you want to partially render. For more fine grained control, I will use javascript (jquery) to manipulate the DOM directly rather than rendering partials.

Alan Jackson
Agreed, it's better to use jquery (ASP.NET MVC is designed to have intellisense against jquery) to control the DOM than MS tools. You have more granular control, this is exactly what I do. +1
Kezzer