Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Source Code for JQuery ASP.NET Controls

, 10 Jun 2009
Get a start to building your own JQuery Controls
Mullivan.Web.zip
TestApp
App_Data
bin
Meps.Web.dll
Meps.Web.pdb
Mullivan.Web.dll
Mullivan.Web.pdb
TestApp.dll
TestApp.pdb
CSS
images
ui-bg_flat_30_cccccc_40x100.png
ui-bg_flat_50_5c5c5c_40x100.png
ui-bg_glass_20_555555_1x400.png
ui-bg_glass_40_0078a3_1x400.png
ui-bg_glass_40_ffc73d_1x400.png
ui-bg_gloss-wave_25_333333_500x100.png
ui-bg_highlight-soft_80_eeeeee_1x100.png
ui-bg_inset-soft_25_000000_1x100.png
ui-bg_inset-soft_30_f58400_1x100.png
ui-icons_222222_256x240.png
ui-icons_4b8e0b_256x240.png
ui-icons_a83300_256x240.png
ui-icons_cccccc_256x240.png
ui-icons_ffffff_256x240.png
Images
bass.jpg
drums.jpg
guitar.jpg
mic.jpg
piano.jpg
LocalTestRun.testrunconfig
Properties
TestApp.csproj.user
TestResults
Sully_SULLYLAPTOP 2009-05-18 11_46_18.trx
Sully_SULLYLAPTOP 2009-05-18 11_46_18
In
SULLYLAPTOP
Out
testproject.dll
TestProject.pdb
Sully_SULLYLAPTOP 2009-05-18 11_47_15.trx
Sully_SULLYLAPTOP 2009-05-18 11_47_15
In
SULLYLAPTOP
Out
testproject.dll
TestProject.pdb
Sully_SULLYLAPTOP 2009-05-18 11_48_19.trx
Sully_SULLYLAPTOP 2009-05-18 11_48_19
Out
testproject.dll
TestProject.pdb
Sully_SULLYLAPTOP 2009-05-18 11_50_12.trx
Sully_SULLYLAPTOP 2009-05-18 11_50_12
In
SULLYLAPTOP
Out
testproject.dll
TestProject.pdb
Sully_SULLYLAPTOP 2009-05-18 11_51_17.trx
Sully_SULLYLAPTOP 2009-05-18 11_51_17
Out
testproject.dll
TestProject.pdb
Sully_SULLYLAPTOP 2009-05-18 11_52_03.trx
Sully_SULLYLAPTOP 2009-05-18 11_52_03
In
SULLYLAPTOP
Out
testproject.dll
TestProject.pdb
Sully_SULLYLAPTOP 2009-05-18 11_52_28.trx
Sully_SULLYLAPTOP 2009-05-18 11_52_28
In
SULLYLAPTOP
Out
testproject.dll
TestProject.pdb
Sully_SULLYLAPTOP 2009-05-19 11_04_00.trx
Sully_SULLYLAPTOP 2009-05-19 11_04_00
Out
testproject.dll
TestProject.pdb
Sully_SULLYLAPTOP 2009-05-19 11_25_01.trx
Sully_SULLYLAPTOP 2009-05-19 11_25_01
Out
testproject.dll
TestProject.pdb
Sully_SULLYLAPTOP 2009-05-19 11_25_08.trx
Sully_SULLYLAPTOP 2009-05-19 11_25_08
Out
testproject.dll
TestProject.pdb
Sully_SULLYLAPTOP 2009-05-19 11_25_29.trx
Sully_SULLYLAPTOP 2009-05-19 11_25_29
Out
testproject.dll
TestProject.pdb
Sully_SULLYLAPTOP 2009-05-19 11_26_11.trx
Sully_SULLYLAPTOP 2009-05-19 11_26_11
In
SULLYLAPTOP
Out
testproject.dll
TestProject.pdb
Sully_SULLYLAPTOP 2009-05-20 13_45_21.trx
Sully_SULLYLAPTOP 2009-05-20 13_45_21
In
SULLYLAPTOP
Out
testproject.dll
TestProject.pdb
TestSecurity.suo
TestSecurity.vsmdi
Mullivan.Web
bin
Debug
Mullivan.Web.dll
Images
calendar.gif
hSliderEnd.gif
hSliderMid.gif
hSliderTab.gif
vSliderEnd.gif
vSliderMid.gif
vSliderTab.gif
JS
Mullivan.snk
Properties
UI
Design
WebControls
WebControls
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace Mullivan.Web.UI.WebControls
{

    public class JQueryAccordionSectionCollection : IList, ICollection, IEnumerable
    {
        private JQueryAccordion _owner = null;

        internal JQueryAccordionSectionCollection(JQueryAccordion owner)
        {
            this._owner = owner;
        }

        public void Add(JQueryAccordionSection section)
        {
            if (section == null)
            {
                throw new ArgumentNullException("wizardStep");
            }
            this.RemoveIfAlreadyExistsInsections(section);
            section.PreventAutoID();
            section.SetOwner(this._owner);
            this.Sections.Add(section);
            this.NotifysectionsChanged();
        }

        public void AddAt(int index, JQueryAccordionSection section)
        {
            if (section == null)
            {
                throw new ArgumentNullException("section");
            }
            this.RemoveIfAlreadyExistsInsections(section);
            section.PreventAutoID();
            section.SetOwner(this._owner);
            this.Sections.AddAt(index, section);
            this.NotifysectionsChanged();
        }

        public void Clear()
        {
            this.Sections.Clear();
            this.NotifysectionsChanged();
        }

        public bool Contains(JQueryAccordionSection section)
        {
            if (section == null)
            {
                throw new ArgumentNullException("section");
            }
            return this.Sections.Contains(section);
        }

        public void CopyTo(JQueryAccordionSection[] array, int index)
        {
            this.Sections.CopyTo(array, index);
        }

        public IEnumerator GetEnumerator()
        {
            return this.Sections.GetEnumerator();
        }

        private JQueryAccordionSection GetSectionAndVerify(object value)
        {
            JQueryAccordionSection base2 = value as JQueryAccordionSection;
            if (base2 == null)
            {
                throw new ArgumentException("Invalid type. Must be JQueryAccordionSection.");
            }
            return base2;
        }

        public int IndexOf(JQueryAccordionSection section)
        {
            if (section == null)
            {
                throw new ArgumentNullException("section");
            }
            return this.Sections.IndexOf(section);
        }

        public void Insert(int index, JQueryAccordionSection section)
        {
            this.AddAt(index, section);
        }

        internal void NotifysectionsChanged()
        {
        }

        public void Remove(JQueryAccordionSection section)
        {
            if (section == null)
            {
                throw new ArgumentNullException("section");
            }
            this.Sections.Remove(section);
            section.SetOwner(null);
            this.NotifysectionsChanged();
        }

        public void RemoveAt(int index)
        {
            JQueryAccordionSection base2 = this.Sections[index] as JQueryAccordionSection;
            if (base2 != null)
            {
                base2.SetOwner(null);
            }
            this.Sections.RemoveAt(index);
            this.NotifysectionsChanged();
        }

        private void RemoveIfAlreadyExistsInsections(JQueryAccordionSection section)
        {
            if (section.Owner != null)
            {
                section.Owner.Sections.Remove(section);
            }
        }

        void ICollection.CopyTo(Array array, int index)
        {
            this.Sections.CopyTo(array, index);
        }

        int IList.Add(object value)
        {
            JQueryAccordionSection stepAndVerify = this.GetSectionAndVerify(value);
            this.Add(stepAndVerify);
            return this.IndexOf(stepAndVerify);
        }

        bool IList.Contains(object value)
        {
            return this.Contains(this.GetSectionAndVerify(value));
        }

        int IList.IndexOf(object value)
        {
            return this.IndexOf(this.GetSectionAndVerify(value));
        }

        void IList.Insert(int index, object value)
        {
            this.AddAt(index, this.GetSectionAndVerify(value));
        }

        void IList.Remove(object value)
        {
            this.Remove(this.GetSectionAndVerify(value));
        }

        // Properties
        public int Count
        {
            get
            {
                return this.Sections.Count;
            }
        }

        public bool IsReadOnly
        {
            get
            {
                return this.Sections.IsReadOnly;
            }
        }

        public bool IsSynchronized
        {
            get
            {
                return false;
            }
        }

        public JQueryAccordionSection this[int index]
        {
            get
            {
                return (JQueryAccordionSection)this.Sections[index];
            }
        }

        public object SyncRoot
        {
            get
            {
                return this;
            }
        }

        bool IsFixedSize
        {
            get
            {
                return false;
            }
        }

        bool IList.IsFixedSize
        {
            get
            {
                return false;
            }
        }

        object IList.this[int index]
        {
            get
            {
                return this.Sections[index];
            }
            set
            {
                this.RemoveAt(index);
                this.AddAt(index, this.GetSectionAndVerify(value));
            }
        }

        private JQueryAccordionSectionControlCollection Sections
        {
            get
            {
                return this._owner.SectionControls;
            }
        }

    }
}

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)

About the Author

Sike Mullivan
Software Developer (Senior)
United States United States
I am a Sr SharePoint Developer in Saint Louis, MO. I've been developing professionally for about four years now. For three years I worked for a Document Imaging company that developed applications for Scanning, Indexing, Migrating, and Searching SharePoint (MOSS, WSS). I'm now working on a team for a Cable company that customizes their internal and external SharePoint implementations.

| Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 10 Jun 2009
Article Copyright 2009 by Sike Mullivan
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid