Click here to Skip to main content
15,885,244 members
Articles / Web Development / ASP.NET

Source Code for JQuery ASP.NET Controls

Rate me:
Please Sign up or sign in to vote.
4.56/5 (15 votes)
10 Jun 2009CPOL 67.2K   3.7K   93  
Get a start to building your own JQuery Controls
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JQueryAccordionPage.aspx.cs" Inherits="TestApp.JQueryAccordionPage" %>

<%@ Register assembly="Mullivan.Web" namespace="Mullivan.Web.UI.WebControls" tagprefix="cc1" %>

<!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>JQuery Accordion</title>
    <link href="/CSS/jquery171.css" type="text/css" rel="stylesheet" />

</head>
<body>
    <form id="form1" runat="server">
   
        <cc1:JQueryAccordion ID="JQueryAccordion1" runat="server" 
            ActiveSectionIndex="2"  Width="316px" >
            <Sections>
                 <cc1:JQueryAccordionSection ID="JQueryAccordionSection1" runat="server" Name="Guitars" ImageUrl="~/Images/guitar.jpg" 
                   ImageHeight="15px">
                   <ContentTemplate>
                           The guitar is a musical instrument with ancient roots that is used in a wide 
                           variety of musical styles. 

                   </ContentTemplate>
               </cc1:JQueryAccordionSection>
               <cc1:JQueryAccordionSection ID="JQueryAccordionSection2" runat="server" Name="Drums" ImageUrl="~/Images/drums.jpg" 
                   ImageHeight="15px">
                   <ContentTemplate>
                           The drum is a member of the percussion group of music instruments, technically 
                           classified as a membranophone. Drums consist of at least one membrane, called a 
                           drumhead or drum skin, that is stretched over a shell and struck, either 
                           directly with parts of a player&#39;s body, or with some sort of implement such as a 
                           drumstick, to produce sound. Other techniques have been used to cause drums to 
                           make sound, such as the &quot;Thumb roll&quot;. Drums are the world&#39;s oldest and most 
                           ubiquitous musical instruments, and the basic design has remained virtually 
                           unchanged for thousands of years. Most drums are considered &quot;untuned 
                           instruments&quot;, however many modern musicians are beginning to tune drums to 
                           songs; Terry Bozzio has constructed a kit using diatonic and chromatically tuned 
                           drums. A few such as timpani are always tuned to a certain pitch. Often, several 
                           drums are arranged together to create a drum kit that can be played by one 
                           musician with all four limbs.
                   </ContentTemplate>
               </cc1:JQueryAccordionSection>
               <cc1:JQueryAccordionSection ID="JQueryAccordionSection3" runat="server" Name="Piano" ImageUrl="~/Images/piano.jpg" 
                   ImageHeight="15px">
                   <ContentTemplate>
                            <asp:Button ID="Button1" Text="Do Postback and Hold Selected Tab" runat="server" />
                           The piano is a musical instrument which is played by means of a keyboard. Widely 
                           used in Western music for solo performance, ensemble use, chamber music, and 
                           accompaniment, the piano is also very popular as an aid to composing and 
                           rehearsal. Although not portable and often expensive, the piano&#39;s versatility 
                           and ubiquity have made it one of the most familiar musical instruments. Pressing 
                           a key on the piano&#39;s keyboard causes a felt covered hammer to strike steel 
                           strings. The hammers rebound, allowing the strings to continue vibrating at 
                           their resonant frequency.[1] These vibrations are transmitted through a bridge 
                           to a sounding board that couples the acoustic energy to the air so that it can 
                           be heard as sound. When the key is released, a damper stops the string&#39;s 
                           vibration. Pianos are sometimes classified as both a percussion and a stringed 
                           instrument. According to the Hornbostel-Sachs method of music classification, it 
                           is grouped with Chordophones. The word piano is a shortened form of the word 
                           pianoforte, which is seldom used except in formal language and derived from the 
                           original Italian name for the instrument, clavicembalo [or gravicembalo] col 
                           piano e forte (literally harpsichord with soft and loud). This refers to the 
                           instrument&#39;s responsiveness to keyboard touch, which allows the pianist to 
                           produce notes at different dynamic levels by controlling the speed with which 
                           the hammers hit the strings.
                   </ContentTemplate>
               </cc1:JQueryAccordionSection>
               <cc1:JQueryAccordionSection ID="JQueryAccordionSection4" runat="server" Name="Bass" ImageUrl="~/Images/bass.jpg" 
                   ImageHeight="15px" OnClientSectionSelected="__SectionChanged">
                   <ContentTemplate>
                           The electric bass guitar[1] (also called electric bass,[2][3][4] or simply bass; 
                           pronounced /ˈbeɪs/, as in &quot;base&quot;) is a stringed instrument played primarily with 
                           the fingers or thumb (either by plucking, slapping, popping, tapping, or 
                           thumping), or by using a plectrum. The bass guitar is similar in appearance and 
                           construction to an electric guitar, but with a larger body, a longer neck and 
                           scale length, and usually four strings tuned to the same pitches as those of the 
                           double bass,[5] which correspond to pitches one octave lower than those of the 
                           four lower strings of a guitar (E, A, D, and G).[6] The bass guitar is a 
                           transposing instrument, as it is notated in bass clef an octave higher than it 
                           sounds (as is the double bass) in order to avoid the excessive use of ledger 
                           lines. Like the electric guitar, the electric bass guitar is plugged into an 
                           amplifier and speaker for live performances. Since the 1950s, the electric bass 
                           guitar has largely replaced the double bass in popular music as the bass 
                           instrument in the rhythm section. While the types of basslines performed by the 
                           bass guitarist vary widely from one style of music to another, the bass 
                           guitarist fulfills a similar role in most types of music: anchoring the harmonic 
                           framework and laying down the beat. The bass guitar is used in many styles of 
                           music including rock, metal, pop, country, blues and jazz. It is used as a 
                           soloing instrument in jazz, fusion, Latin, funk, and in some rock and metal 
                           (mostly progressive rock and progressive metal) styles.
                   </ContentTemplate>
               </cc1:JQueryAccordionSection>
               <cc1:JQueryAccordionSection ID="JQueryAccordionSection5" runat="server" Name="Vocals" 
                   ImageUrl="~/Images/mic.jpg" ImageHeight="15px">
                   <ContentTemplate>
                           Singing is the act of producing musical sounds with the voice, which is often 
                           contrasted with regular speech. A person who sings is called a singer or 
                           vocalist. Singers perform music known as songs that can either be sung a 
                           cappella (without accompaniment) or accompanied by musicians and instruments 
                           ranging from a single instrumentalist (a duet with a piano) to a full symphony 
                           orchestra or big band. Singing is often done in a group of other musicians, such 
                           as in a choir of singers with different voice ranges, or in an ensemble with 
                           instrumentalists, such as a rock group or baroque ensemble. Nearly anyone who 
                           can speak can sing, since in many respects singing is a form of sustained 
                           speech. Singing can be informal and done for pleasure, for example, singing in 
                           the shower or karaoke; or it can be very formal, as in the case of singing 
                           during a religious ritual such as a Mass or professional singing performances 
                           done on stage or in a recording studio. Singing at a high amateur or 
                           professional level usually requires innate talent, instruction, and regular 
                           practice.[1] Professional singers usually build their careers around one 
                           specific musical genre, such as Classical or rock, they typically take voice 
                           training provided by a voice teacher or vocal coach throughout their career.
                   </ContentTemplate>
               </cc1:JQueryAccordionSection>
            </Sections>
        </cc1:JQueryAccordion>
        <script language="javascript" type="text/javascript">

            function __SectionChanged(event, ui) {
                alert('Section ' + ui.newHeader[0].innerText + ' has been selected');
            }
        
        </script>
    </form>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

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


Written By
Software Developer (Senior)
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions