Wednesday, March 28, 2012

Link Click refresh effect?

I got a master page and 2 content page.

the menu links are on the left content page.

How can i get refresh effect on the right content page when i click on the links on the left page?

http://code.google.com/webtoolkit/documentation/examples/kitchensink/demo.htmlHi,

one approach is to use theUpdatePaneltogether with theMultiViewcontrol.
Thanks very much,i got it.
sorry, can i get that kind of effect just click a link on the page without MultView?

eg. i put a link on the left content page. the right content page will refresh when i click the link?

Hi Joytony,

When you click the link, do you want to display a totally new page?? could you post the code you use for the links?

Greetings,

Dennis


Thanks Dennis,

This is the demo i did.

1 master page contain 2 links on it.
while i have 2 content page

~/Default2.aspx
~/Default3.aspx
How can i get the refresh effect in this model?
<%@. Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">Untitled Page"server"> "form1" runat="server"> "scriptmanager1" EnablePartialRendering="true" runat="Server" /> "up1" runat="server">

"HyperLink1" runat="server" NavigateUrl="~/Default2.aspx">HyperLink "HyperLink2" runat="server" NavigateUrl="~/Default3.aspx">HyperLink

"ContentPlaceHolder1" runat="server">

"Progress" runat="server"> Loading...

sorry, put the code again.
<form id="form1" runat="server"> <atlas:ScriptManager ID="scriptmanager1" EnablePartialRendering="true" runat="Server" /> <atlas:UpdatePanel ID="up1" runat="server"> <ContentTemplate> <div> <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Default2.aspx">HyperLink</asp:HyperLink> <asp:HyperLink ID="HyperLink2" runat="server" NavigateUrl="~/Default3.aspx">HyperLink</asp:HyperLink> <asp:LinkButton ID="LinkButton1" runat="server">LinkButton</asp:LinkButton> <asp:LinkButton ID="LinkButton2" runat="server">LinkButton</asp:LinkButton> </div> <div> <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> </div> </ContentTemplate> </atlas:UpdatePanel> <atlas:UpdateProgress ID="Progress" runat="server"> <ProgressTemplate> Loading... </ProgressTemplate> </atlas:UpdateProgress> </form>

Hi JoyTony,

I don't think that its possible to open a new page in another frame without a full postback. (If this is want you want to achieve). I think that Atlas is useful when you want parts of a webpage to be updated not whole pages. I think that the suggestion above with the multiview is the only option. Is there a reason that you don't want to use multiview??

Greetings,

Dennis


Hi Again,

What is the reason that you put your buttons in the update panel? These controls shoudn't be updated right?

Regards


Hmm, it seems you're kinda misusing the concept., although I do see what you're trying to do i think. If I'm not mistaken you're trying to only get the non master portion to refresh, similar to what one would achieve using frames? If so, other than the fact that it's probably not going to work, your pages will not be picked up by search engines, which is really bad unless its an intranet site.

It would be real nice if ATLAS did solve the problem of same masterpage markup being sent back with every page though, but i guess with a well designed site that should be very minimal.

Nick


Thanks Dennis andnicksh.

The reason why i don't want to use multiple view is i've done many pages there.

I just leave it there at the moment untill we really want to change. Thanks.

No comments:

Post a Comment