Tuesday, 22 July 2014

Creating a Simple Accordion - ASP.NET,Ajax accordion control for asp.net


How to work with Simple Accordion


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
   
     .accordionHeaderSelected {
background-color: #5078B3;
border: 1px solid #2F4F4F;
color: white;
cursor: pointer;
font-family: Arial,Sans-Serif;
font-size: 12px;
font-weight: bold;
margin-top: 5px;
padding: 5px;
width:20%;
}
 .accordionContent {
background-color: #D3DEEF;
border-color: -moz-use-text-color#2F4F4F #2F4F4F;
border-right: 1pxdashed #2F4F4F;
border-style: nonedashed dashed;
border-width: medium1px 1px;
padding: 10px 5px 5px;
width:20%;
}
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <ajaxToolkit:ToolkitScriptManagerID="ToolkitScriptManager1"runat="server">
    </ajaxToolkit:ToolkitScriptManager>

    <div>
        <ajaxToolkit:Accordion ID="Accordion1"runat="server"
            ContentCssClass="accordionContent"HeaderCssClass="accordionHeaderSelected"
            >
        <Panes>
            <ajaxToolkit:AccordionPane ID="ACCDNPANEL1"runat="server">
            <Header>Train with remains of victims
            </Header>
           <Content>
          A train carrying the remains of victims of Malaysian plane MH17 downed<br /> over rebel-held territory in eastern Ukraine arrived in Ukrainian govt-held Kharkiv.
         
          <asp:Button ID="btn1" runat="server"Text="Read more" />
           </Content>


            </ajaxToolkit:AccordionPane>

                <ajaxToolkit:AccordionPane runat="server">
                 <Header>film news</Header>
           <Content>
          
               A train carrying the remains of victims of Malaysian plane MH17 downed over <br /> rebel-held territory in eastern Ukraine arrived in Ukrainian govt-held Kharkiv.</Content>
                </ajaxToolkit:AccordionPane>

                 <ajaxToolkit:AccordionPane ID="AccordionPane1"runat="server">
                 <Header>Sports news</Header>
           <Content>
          
               A train carrying the remains of victims of Malaysian plane MH17 downed <br /> over rebel-held territory in eastern Ukraine arrived in Ukrainian govt-held Kharkiv.
          <asp:Button ID="Button1"runat="server"Text="Read more"  />
               </Content>
                </ajaxToolkit:AccordionPane>
            </Panes>
        </ajaxToolkit:Accordion>
    </div>
    </form>
</body>
</html>


Saturday, 19 July 2014

how to Work with TabContainer in ajax toolkit


Aspx.cs Code for Tab Container
<div>
       
        <asp:UpdatePanel ID="tupdata"runat="server">
       
          <ContentTemplate>
           
          </ContentTemplate>
        </asp:UpdatePanel>
       
        <asp:TabContainer ID="TabContainer1"  runat="server" ActiveTabIndex="0"
            Width="707px">
            <asp:TabPanel HeaderText="Registration"runat="server"ID="tb1">
                <ContentTemplate>
                <asp:TabContainer ID="tbc2" runat="server">
                  <asp:TabPanel runat="server"ID="t">
                  <ContentTemplate>
                    <table>
                        <tr>
                            <td>
                                First Name
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txtfirstname"runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Last Name
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txtlast"runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Password
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txtpassword" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                ReEnter-Password
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txtrepassword"runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Email ID
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txtemail"runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                phoneNo
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txtphoneno"runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Location
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="txtloc" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                            </td>
                            <td>
                                <asp:Button ID="btnreset"runat="server"Text="Cancel"/>
                            </td>
                        </tr>
                    </table>
                    </ContentTemplate>
                  </asp:TabPanel>
                  <asp:TabPanel runat="server"ID="TabPanel2">
                  <ContentTemplate>
                    <table>
                        <tr>
                            <td>
                                First Name
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox15"runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Last Name
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox16"runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                               <span style="background-color:red">Password</span>
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox17"runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                ReEnter-Password
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox18"runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Email ID
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox19"runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                phoneNo
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox20"runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Location
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox21"runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                            </td>
                            <td>
                                <asp:Button ID="Button3"runat="server"Text="Cancel"/>
                            </td>
                        </tr>
                    </table>
                    </ContentTemplate>
                  </asp:TabPanel>
                </asp:TabContainer>
                   
                </ContentTemplate>
            </asp:TabPanel>
            <asp:TabPanel HeaderText="Login"ID="tb2"runat="server">
                <ContentTemplate>
                    <table>
                        <tr>
                            <td>
                                First Name
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox1"runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Last Name
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox2"runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Password
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox3"runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                ReEnter-Password
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox4"runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Email ID
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox5"runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                phoneNo
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox6"runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Location
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox7"runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                            </td>
                            <td>
                                <asp:Button ID="Button1"runat="server"Text="Cancel"/>
                            </td>
                        </tr>
                    </table>
                </ContentTemplate>
            </asp:TabPanel>
            <asp:TabPanel HeaderText="Home"ID="TabPanel1"runat="server">
                <ContentTemplate>
                    <table>
                        <tr>
                            <td>
                                First Name
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox8"runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Last Name
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox9"runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Password
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox10"runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                ReEnter-Password
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox11"runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Email ID
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox12"runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                phoneNo
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox13"runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Location
                            </td>
                            <td>
                                :
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox14"runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                            </td>
                            <td>
                                <asp:Button ID="Button2"runat="server"Text="Cancel"/>
                            </td>
                        </tr>
                    </table>
                </ContentTemplate>
            </asp:TabPanel>
        </asp:TabContainer>
    </div>