Hi all,
I need a Menu control horizontally laid out at the top the screen on a master page as shown below.
Tab1 Tab2 Tab3 Tab4 Tab5
Each tab would navigate to a different page, Tab1 to Page1.aspx, Tab2 to Page2.aspx, ...Tabi to Pagei.aspx etc.
Is it possible to change between different tabs(pages) in a Ajaxy way(so that the user doesnt see the flicker or the progress bar at the bottom of browser on the task bar),
I see that UpdatePanel does not integrate well with asp:menu, and a I saw a couple of posts where people have used the CallBack feature of asp.net 2.0 to attain the effect. Is this the only solution?
Thanks for your time
try it.....
Master.aspx File
<%@. Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<!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">
<link href="http://links.10026.com/?link=StyleSheet.css" rel="stylesheet" type="text/css" />
<title>Master Page ::</title>
</head>
<body>
<form id="form1" runat="server">
<table cellpadding="0" cellspacing="0" id="MasterContainer" width="100%">
<tr>
<td id="BannerContainer" align="left" colspan="2">
Tab Demo Site
</td>
</tr>
<tr>
<td id="ContentContainer" valign="top" style="height: 19px">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td colspan="2">
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="TabMenuContainer">
<tr>
<td>
<asp:Menu CssClass="TabMenu" DataSourceID="TabMenuSitemap" HideSelectElements= "True" ID="Menu2" Orientation="Horizontal" runat="server">
<StaticSelectedStyle CssClass="TabMenuItemSelected" />
<StaticMenuItemStyle CssClass="TabMenuItem" />
<StaticMenuStyle CssClass="SiteStaticMenu" />
<StaticHoverStyle CssClass="TabMenuItemHover" />
<DataBindings>
<asp:MenuItemBinding DataMember="SiteMapNode" Depth="0"
NavigateUrlField="Url" TextField="Title" ToolTipField="Description" />
</DataBindings>
</asp:Menu>
</td>
<td class="TabMenuSpacer" width="100%"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" valign="top">
<div id="SiteContent">
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</td>
<td>
<div class="SiteContentSpacer"></div>
</td>
</tr>
</table>
</tr>
</table>
<asp:SiteMapDataSource ID="TabMenuSitemap" runat="server" ShowStartingNode="false" />
</form>
</body>
</html>
WEb.sitemap File
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/ AspNet/SiteMap-File-1.0" >
<siteMapNode url="" title="" description="" roles="*">
<siteMapNode url="~/default.aspx" title="My WebPage" description="The Home Page" roles="*" />
<siteMapNode url="~/default2.aspx" title="My WebPage 1" description="The First Tab" roles="*" />
<siteMapNode url="~/default3.aspx" title="My WebPage 2" description="The Second Tab" roles="*" />
</siteMapNode>
</siteMap>
No comments:
Post a Comment