Tuesday, 10 June 2014

Accordion Ajax Control Toolkit Example in Asp.net OR How to Use Ajax Accordion Control in Asp.Net

6/10/2014 - By Pranav Singh 2

Ajax is playing one of the biggest roles in the web world. So for ajax Microsoft have provided ajax control tool kit for ajax controls. In this article I will show you how you can implement an ajax Ajax AccordionControl in your asp.net application.

In this article I have used asp.net, CSS  and ajax control toolkit.


So for this article first we will create a new asp.net application add script manager in our page, Accordion control in our page. After adding control we will add the AccordionPane for adding header and content section for adding detail of menu.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AccrodianMenu.aspx.cs"
    Inherits="ProjectDemo_Asp.et.AccrodianMenu" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!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>Ajax Control Toolkit Accordion Example OR oHw to Use Ajax Accordion Control in
        Asp.Net</title>
    <style type="text/css">
        .contentclass { margin: 1em; border-collapse: collapse; }
        .headerclass { padding: .3em; border: 1px #ccc solid; background: #fc9; }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:Accordion ID="Accordion1" runat="server" ContentCssClass="contentclass" HeaderCssClass="headerclass">
            <Panes>
                <asp:AccordionPane ID="AccordionPane1" runat="server" ContentCssClass="contentclass" HeaderCssClass="headerclass">
                    <Header>JAVASCRIPT</Header>
                    <Content>This section will reresent hte javascript section</Content>
                </asp:AccordionPane>
                <asp:AccordionPane ID="AccordionPane2" runat="server" ContentCssClass="contentclass" HeaderCssClass="headerclass">
                    <Header>JQUERY</Header>
                    <Content>This section will repserset jquery section</Content>
                </asp:AccordionPane>
                <asp:AccordionPane ID="AccordionPane3" runat="server" ContentCssClass="contentclass" HeaderCssClass="headerclass">
                    <Header>ASP.NET</Header>
                    <Content>This section will represent asp.net section to learn.</Content>
                </asp:AccordionPane>
            </Panes>
        </asp:Accordion>
    </div>
    </form>
</body>
</html>

Now view your page in browser.


About the Author

We are the group of people who are expertise in different Microsoft technology like Asp.Net,MVC,C#.Net,VB.Net,Windows Application,WPF,jQuery,Javascript,HTML. This blog is designed to share the knowledge.

Get Updates

Subscribe to our e-mail newsletter to receive updates.

Share This Post

2 comments:

Please let me know your view

Free Ebooks


About Us

We are the group of people who are expertise in different Microsoft technology like Asp.Net,MVC,C#.Net,VB.Net,Windows Application,WPF,jQuery,Javascript,HTML. This blog is designed to share the knowledge.

Contact Us

For writing article in this website please send request by your

GMAIL ID: dotnetpools@gmail.com

Bugs and Suggestions

As we all know that this website is for sharing knowledge and providing proper solution. So while reading the article is you find any bug or if you have any suggestion please mail us at contact@aspdotnet-pools.com.

Partners


Global Classified : Connectseekers.com
© 2014 aspdotnet-pools.com Designed by Bloggertheme9.
back to top