In a previous post "Partial page rendering", we have looked into ASP.NET Ajax basics - partial rendering using UpdatePanel control. In this article you will see another way to perform partial page rendering and that is - by calling a ScriptService from JavaScript.
Let's see why UpdatePanels are not always a good solution. UpdatePanels are very simple and it is very easy to turn your classic aspx pages into ajax-enabled pages. However, this has its own downsides:
- Each request includes full ViewState that travels to the server and back to the client
- Full web page lifecycle still remains
- The size of the response is still large since the whole portion of HTML markup is rendered
When developing complex applications, this could be a point for potential blunders. Much more optimization can be achieved by putting ScriptServices into the game.
Continue reading