开发者

Reload only Content Pages Inside the Masterpage

I have more than 100pages in my project & a single master page for all this. My masterpage has links to different pages. I want to change only the ContentPages( Child Pages) & my masterpage should not get reloaded.

For Example: My Master page is : SiteMaster.master Child Page1: Add.aspx Child Page2: Sub.aspx

When I execute, Add.aspx comes inside th开发者_StackOverflow社区e SiteMaster.master. Know, When I click the sub.aspx link inside the Add.aspx, only add.aspx page should be changed & sub.aspx must be loaded. I don't want to reload the master page.

If possible, please post some examples or links.


Your expected behavior is not exactly how master pages work. There may be ways to achieve a no postback solution in this scenario but the easiest one would be to use an <IFrame /> (which is usually frowned upon)


Master page is part of your pages. It's not loading separately.

Simple explanation:

ASP.NET engine takes your aspx and puts it inside the master page and then renders it as one page, then serves it to user.

If this is not what you want and you want that only content of your master page be loaded, then you should not use master pages at all! It's against nature of master pages. they act like skins for aspx pages.

Search for HTML IFrame tag and don't use master page.

P.S: IFrames are not used widely in this days.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜