2
votes

In my website, I have created a masterpage and attached all of my pages to it. My masterpage structure contains a header and a footer. On the left it has a treeview control, which i have attached to all my pages, and on the right there is a contentplaceholder to show the content of respective pages.

My problem is that when I click any link in the treeview it refreshes the whole masterpage and open the respective page. I wish to avoid this refresh. Means it should show the contents of page on right side contentplaceholder without refreshing the whole page.

I have seen people suggesting to use iframes. But for using iframes I shall have to restructure my website. Is there any other solution than iframes and with minimal changes to the work that I have done?

3
Did you Get the Solution to this Question?? If Yes Can you tell me??? - Krishna Thota

3 Answers

3
votes

You will probably want to look at using AJAX to stop this from happening. You will want to read up on using an UpdatePanel. Below are some good articles that goes over this:

You also have the option of using jQuery to handle your AJAX calls. While I typically prefer the use of jQuery when using AJAX, I am not sure I would use it in your situation. If you would like to look at what it offers take a look at these links:

0
votes

You could put the content you wish to change inside an asp:UpdatePanel that way that will be the only thing that is repainted (it uses AJAX under the hood):

http://msdn.microsoft.com/en-us/library/system.web.ui.updatepanel.aspx

0
votes

The master page class derives from the UserControl class and the master page is like a child control. So we can say that master page is not a true page, when a page loads we can notice the navigation URL in the address bar is the content page's but not the master page! so we cannot refresh a content page without refreshing master page.

there is one way to avoid flickering the page by adding the code in < Head > section in the masterpage.

<meta http-equiv="Page-Enter" content="blendTrans(Duration=0)"/>

<meta http-equiv="Page-Exit" content="blendTrans(Duration=0)"/>