I have only just started looking into ajax and was wondering if it's possible to get a frame like effect?
At the moment I have a master page with all my menus on etc. this doesn't change anywhere so in an ideal world I would like to remove the brief screen flicker as I go from one page to the next. Under original ASP I would just have had it as a seperate frame across the top of the page so it never needed to change.
I have tried placing the content placeholder inside an update panel, but that hasn't achieved the desired effect since the page is still changing. Has anyone else had the same issue, come up with a cunning plan for this, found it impossible?
Any feedback would be great.
Cheers
Jon
Well, you can still use a frame if you want, nothing about .Net changes that.
The basic mistake you're making is in thinking that a Master page is anything special once the page gets rendered; it isn't. The master page just provides canned markup for a page as it gets ready to load and send. So each time you press a link that takes you to another page, you'll go to another page no matter what. Frames make this look like you're not changing pages, but in fact you still are (just your page change is contained w/in part of the browser window).
If you want to do what you're describing, the answer lies not w/ the master page - aspx page relationship. Instead, you want to look at ways to load content into a given part of your page based on input / clicks. One method that I like quite a lot is over on Scott Guthrie's blog (http://weblogs.asp.net/scottgu/archive/2006/10/22/Tip_2F00_Trick_3A00_-Cool-UI-Templating-Technique-to-use-with-ASP.NET-AJAX-for-non_2D00_UpdatePanel-scenarios.aspx ) but there are certainly other methods of doing it.
Cool, I'll have a go with that, thanks for the help.
Jon
No comments:
Post a Comment