Click here to Skip to main content
15,915,328 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Sir/Madam,

I am developing a website in asp.net with c#. I have a 10 content page and a master page. My problem is whenever i click menu button for content page that time my content page is loading that's fine but why my master page is loading . That loading slow up my website to content page loading because i have 4 to 5 methods in master page load event.

What I have tried:

I have googled it and find that master page will load at last after content page but i want prevent that load how can i do . I also used update panel in that but doesn't happened anything new .
Posted
Updated 22-Jun-16 23:42pm
Comments
Kats2512 23-Jun-16 5:21am    
Your question makes no sense at all. Please rephrase and update the question.
Mohammad Nawaz 23-Jun-16 5:33am    
i have a master page and its 10 content pages . Whenever i click menu button that is on master page to load content page my master page is loading how to prevent that load
Kats2512 23-Jun-16 5:41am    
can you post some code? Are you using a script manager and update panel on your page?

1 solution

That's how master pages work. The content page is injected into the master page and sent to the client as one page. The master page and content page are both executed\rendered with every page even though the url is only pointing to the content page.

If your master page is slow to render then maybe you can use caching of some sort to speed it up, it depends on what it is about the master page that is slow.
 
Share this answer
 
Comments
Mohammad Nawaz 23-Jun-16 5:47am    
Hmm Thanks. any other solution Sir for this

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