Click here to Skip to main content
15,867,308 members
Articles / Web Development / IIS
Article

New Ajax Navigation Bar

Rate me:
Please Sign up or sign in to vote.
1.10/5 (13 votes)
4 Dec 2007CPOL1 min read 43.9K   951   28   5
New Ajax Navigation Docable Bar

Introduction

This is Ajax Docable Navigation Bar. Which will look like Windows XP Navigation. After Installing the application. Type this link in your Browser http://localhost/nvbar/frmCTHomePage.aspx

Background

Fully Based Upon Ajax. This is really nice one.

Using the code

After installing ajax in your system. run this application and see.

This is Dynamically passing Values to the Navigation bar.

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>

<asp:Panel ID="Panel1" runat="server" Height="540px" Width="180px" BackImageUrl="~/images/backcolor1.PNG">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">

<ContentTemplate>
<center>
<table><tr><td>
<ajaxToolkit:Accordion id="dictionaryBound" runat="server" SelectedIndex="0"
HeaderCssClass="accordionHeader" HeaderSelectedCssClass="accordionHeaderSelected"
ContentCssClass="accordionContent" FadeTransitions="true" FramesPerSecond="40"
TransitionDuration="150" AutoSize="None" RequireOpenedPane="false" SuppressHeaderPostbacks="true" Width="167">
<HeaderTemplate>
<%# Eval("Key") %>
</HeaderTemplate>
<ContentTemplate>
<%# Eval("Value") %>
</ContentTemplate>
</ajaxToolkit:Accordion>
</td></tr>
<tr>
<td><br /><br />

</td></tr>
<tr><td> <asp:XmlDataSource ID="xml1" runat="server" DataFile="navxml.xml"/>
<ajaxToolkit:Accordion id="xmlBound" runat="server" DataSourceID="xml1" SelectedIndex="0"
HeaderCssClass="accordionHeader" HeaderSelectedCssClass="accordionHeaderSelected"
ContentCssClass="accordionContent" FadeTransitions="true" FramesPerSecond="40"
TransitionDuration="150" AutoSize="None" RequireOpenedPane="false" SuppressHeaderPostbacks="true" Width="167">
<HeaderTemplate>
<%# Eval("name") %>
</HeaderTemplate>
<ContentTemplate>
<%# Eval("name") %>
</ContentTemplate>
</ajaxToolkit:Accordion></td></tr></table>
</center>
</ContentTemplate> </asp:UpdatePanel>
</asp:Panel>

This code is to pass the values dynamically to navigetion bar:

protected void Page_Load(object sender, EventArgs e)
{
dictionaryBound.Attributes.Add("OnMouseMove", "mousemove()");
if (!IsPostBack)
{

this.DataBind();

Dictionary<string, string> values = new Dictionary<string, string>();
//LinkButton dynamicbutton = new LinkButton();
//dynamicbutton.ID = "b_link1";
//dynamicbutton.Text = "Message";
values["Inbox"] = "";
values["OutBox"] = "This is the value for B";
values["Draft"] = "This is the value for C";
values["SentItems"] = "This is the value for D";
dictionaryBound.DataSource = values;
dictionaryBound.DataBind();
}

}

History

If u have any doubts Contact me to this Email ID dilip.kumar22@rediffmail.com or dilipkumar22@gmail.com

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Unknown
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralNo working Pin
Sanjay Garia8-Apr-09 0:24
Sanjay Garia8-Apr-09 0:24 
GeneralWorks just fine Pin
Dewey30-Nov-07 16:41
Dewey30-Nov-07 16:41 
Generalthe weblink does not work... Pin
Michael Moreno30-Nov-07 3:41
Michael Moreno30-Nov-07 3:41 
GeneralRe: the weblink does not work... Pin
dilip2330-Nov-07 4:07
dilip2330-Nov-07 4:07 
GeneralRe: the weblink does not work... Pin
Jim Crafton30-Nov-07 5:16
Jim Crafton30-Nov-07 5:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.