Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

menu control refresh page

Posted on 2006-04-23
6
Medium Priority
?
1,561 Views
Last Modified: 2008-03-17
In ASP.NET 2.0 I have a master page with menu control.
when the user choose an option in the menu it goes to one of the content pages of the placeholder.
The problem is that pressing the menu control refresh the whole page.
I thought of putting in in Iframe but I already have everything in master or content pages and I don't
know how the ifrmae will get into it?
Any suggestion? so that the menu will not refresh the master page?
0
Comment
Question by:ANAT2403
  • 3
  • 2
6 Comments
 
LVL 30

Expert Comment

by:Irwin Santos
ID: 16520243
put the refresh in the subpage(target)
0
 
LVL 5

Expert Comment

by:Darth_helge
ID: 16520271
maybe i dont understand but my menu control does not refresh the page

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//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">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body style="height: 100%">
    <form id="form1" runat="server">
<asp:menu ID="Menu1" runat="server">
<Items>
<asp:MenuItem Target="MyFrame"  NavigateUrl="http://www.break.com" Text="Click ME!"></asp:MenuItem>
</Items>
</asp:menu>        

<iframe id="MyFrame" name="MyFrame" height="200" width="400"></iframe>
    </form>
</body>
</html>
0
 

Author Comment

by:ANAT2403
ID: 16520938
to irwinpks:
I don't put any refresh its automatic   . How you want me to make the refresh?

to Darth helge:
I took you kod added some more menu items and some are refresh but yours not. But still I don't understand
why some do refresh?

<%@ Page Language="C#" AutoEventWireup="false" CodeFile="Default9.aspx.cs" Inherits="Default9" %>
<!DOCTYPE html PUBLIC "-//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">
<head id="Head1" runat="server">
    <title>Untitled Page</title>
</head>
<body style="height: 100%">
    <form id="form2" runat="server">
<asp:menu ID="Menu1" runat="server" Orientation="Horizontal">
<Items>
<asp:MenuItem Target="MyFrame"  NavigateUrl="http://www.break.com" Text="Click ME!" Value="Click ME!"></asp:MenuItem>
    <asp:MenuItem   Text="item2" Value="item2"></asp:MenuItem>
    <asp:MenuItem   Text="item3" Value="item3"></asp:MenuItem>
</Items>
</asp:menu>        

<iframe id="MyFrame" name="MyFrame" height="200" width="400"></iframe>
 
  <asp:Label ID="Label1" runat="server" Style="z-index: 100; left: 544px; position: absolute;
            top: 64px" Text="Label" Width="72px"></asp:Label>
        <asp:Label ID="Label2" runat="server" Style="z-index: 101; left: 616px; position: absolute;
            top: 184px" Text="Label" Width="80px"></asp:Label>
        <asp:Label ID="Label3" runat="server" Style="z-index: 103; left: 528px; position: absolute;
            top: 288px" Text="Label" Width="120px"></asp:Label>      
    </form>
</body>
</html>
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 5

Expert Comment

by:Darth_helge
ID: 16522570
you have to add the navigateURL on all of the menuitems
0
 

Author Comment

by:ANAT2403
ID: 16522980
As I wrote at the beginning of the question I am not using Iframe but a master page and content and there
I have navigateurl in the code behind and it goes to a panel in the content page. Maby my problem is
specific to the situation of Master page.do you know about that?
0
 
LVL 5

Accepted Solution

by:
Darth_helge earned 1000 total points
ID: 16522989
The content placed on your master page will of course get reloaded when you navigate to another .aspx page which has the current MasterPage. You cannot prevent the master page content to be reloaded except using frames or AJAX/Javascript
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses
Course of the Month21 days, 3 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question