Results 1 to 3 of 3

Thread: Guide me a way to create/use a control

  1. #1

    Thread Starter
    Hyperactive Member csKanna's Avatar
    Join Date
    Dec 2005
    Location
    Tech-Tips-Now.com
    Posts
    339

    Guide me a way to create/use a control

    Hi,

    I am looking to create in my web page a shown in the below screenshot



    guide me how to create the same ? is there any controls already available or the better and simple way to do it ?

    Thanks in advance
    Kanna

  2. #2
    Addicted Member Claude2005's Avatar
    Join Date
    Jan 2010
    Location
    Philippines
    Posts
    166

    Re: Guide me a way to create/use a control

    For the checkboxes, how about this?

    For the aspx page...

    Code:
    <ul>
        <li><asp:CheckBox ID="chkParent1" runat="server" Text="Parent 1" />
            <ul>
                <li><asp:CheckBox ID="chkChild1" runat="server" Text="Child 1" />
                    <ul>
                        <li><asp:CheckBox ID="chkGChild1" runat="server" Text="G Child1" /></li>
                    </ul>
                </li>
                <li><asp:CheckBox ID="chkChild2" runat="server" Text="Child 2" /></li>
            </ul>
        </li>
        <li><asp:CheckBox ID="chkTest" runat="server" Text="Test" /></li>
        <li><asp:CheckBox ID="chkUncategorized" runat="server" Text="Uncategorized" /></li>
    </ul>
    For the CSS

    Code:
    ul  {list-style:none;padding:<your value>;margin:<your value>}

  3. #3
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Guide me a way to create/use a control

    The above "TreeView" can be accomplished using an ASP.Net TreeView control. It ships with the option to show a CheckBox for each node in the tree.

    You can find an example here:

    http://quickstarts.asp.net/quickstar.../treeview.aspx

    The benefit of doing it this way is that you can "bind" your TreeView to a set of data, so that if that data changes (i.e. new nodes get added) your TreeView will automatically update.

    The DropDownList is just a DropDownList control:

    http://www.w3schools.com/aspnet/cont...opdownlist.asp

    And the Button is just a Button:

    http://www.w3schools.com/aspnet/aspnet_button.asp

    All of the controls have been styled using CSS to make them appear different from the default, but I would suggest that you get it to work functionally the way you want it, and then worry about styling it.

    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width