Vamsi Krishna

Vamsi Krishna

  • 1.2k
  • 199
  • 18k

how to stop refreshing contents of master page in asp.net

Aug 29 2016 2:44 AM
i am having one master in that i placed one treeview  control.sub treeview nodes is redirected to another webpages while selecting subtreview nodes it is refreshing master page also
 
how to stop refreshing master page and i want only change web page in content place 
 
billow my code  
 
 
master page code: 
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Entarchy.master.cs" Inherits="BondEnvironmentInfo.Entarchy" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>BondDashboard</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="~/Images/favicon.ico" type="image/x-icon" />
<link href="~/CSS/Home.css" rel="stylesheet" />
<link href="~/CSS/inc.css" rel="stylesheet" />
<link href="~/CSS/PortalFrameworkSystem.css" rel="stylesheet" />
<%-- <asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>--%>
</head>
<body style="background-color: lightgoldenrodyellow;">
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"></asp:ScriptManager>
<div>
<table style="border-collapse: collapse; border-spacing: 0; border: 0; width: 100%; margin: 0 auto;">
<tr>
<td style="width: 15%">
<asp:Image ID="Image1" runat="server" Height="40px" ImageUrl="Images/PortalWebResource.gif" />
</td>
<td id="PageBanner" class="clsPageBanner"><span id="PageTitle" class="clsPageBannerText">
<asp:Label ID="Heading" runat="server" Text="BOND DASH BOARD" ForeColor="Red" Font-Underline="True"></asp:Label>
</td>
<td style="text-align: right; width: 15%">
<asp:Label ID="lbldate" runat="server" ForeColor="LightGreen"></asp:Label>
</td>
</tr>
<tr>
<td colspan="3" id="ThemeBar" class="clsThemeBar" width="100%"></td>
</tr>
<tr>
<td style="border: double; vertical-align: top;">
<div class="scrolling_div">
<asp:TreeView runat="server" ID="TreeView2" ExpandDepth="0" ImageSet="XPFileExplorer" NodeIndent="15" Width="85px" OnSelectedNodeChanged="TreeView2_SelectedNodeChanged">
<HoverNodeStyle Font-Underline="True" ForeColor="#6666AA" />
<Nodes>
<asp:TreeNode Text="LEG1" Target="_blank" >
<asp:TreeNode Text="DEV1" Checked="true" NavigateUrl="~/DEV1.aspx" />
<asp:TreeNode Text="CERT1" NavigateUrl="~/CERT1.aspx" />
<%--<asp:TreeNode Text="INTTEST1" Target= ~/test.aspx" />--%>
<asp:TreeNode Text="CUSTTEST1" Target="_blank" />
<asp:TreeNode Text="DPPT1/MO1" Target="_blank" />
<asp:TreeNode Text="PROD" Target="_blank" />
</asp:TreeNode>
</Nodes>
<NodeStyle Font-Names="Tahoma" Font-Size="8pt" ForeColor="Black" HorizontalPadding="2px" NodeSpacing="0px" VerticalPadding="2px" />
<ParentNodeStyle Font-Bold="False" BackColor="#66FF33" />
<RootNodeStyle ForeColor="Blue" Height="15px" />
<SelectedNodeStyle BackColor="#B5B5B5" Font-Underline="False" HorizontalPadding="0px" VerticalPadding="0px" ForeColor="#FF0066" />
</asp:TreeView>
</div>
</td>
<td colspan="2" style="border: double;">
<div class="scrolling_div">
<%--<iframe id="ifmeX" runat="server" width="100%" height="550" frameborder="no" scrolling="no" allowtransparency="true" src="http://pieteip.com" />--%>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" RenderMode="Block">
<ContentTemplate>
<%--<asp:UpdatePanel ID="Updatepannel1" runat="server">
<ContentTemplate>--%>
<asp:ContentPlaceHolder ID="MainContent" runat="server">
</asp:ContentPlaceHolder>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="TreeView2" />
</Triggers>
</asp:UpdatePanel>
</div>
</td>
</tr>
<tr>
<td colspan="3" id="ThemeBar1" class="clsThemeBar" width="100%"></td>
</tr>
</table>
</div>
</form>
</body>
</html>
dev.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DEV1.aspx.cs" Inherits="BondEnvironmentInfo.DEV1" MasterPageFile="~/Entarchy.Master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
<p>
<asp:Label ID="lbld" runat="server"></asp:Label>
</p>
</asp:Content>
Please  can you tell me how to do without refreshing whole master page ,refresh only content page 
 
Thanks in advance 
 

Answers (1)