Coder Social home page Coder Social logo

venh / associatedlistbox Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 103 KB

Associated List Box Control. A server side control combining list boxes and buttons to move items between lists. This has custom list boxes developed from a user control in ASP.Net website.

ASP 13.17% C# 86.83%

associatedlistbox's Introduction

In ASP.Net, we often need list boxes with a provision to move items between the lists using buttons. We normally end up developing custom controls for this purpose, with its UI elements also handcrafted through custom code in a class. The other approach people take is to drop list boxes (HTML or ASP.Net Controls) and use jQuery / javascript to move items between the lists. This approach may sound really simple. But, the downside, is when you have to get the selected items on a post back, especially, to retain the selection on the selection of some other server control, which would initiate a post back. You can also go in for a completely HTML and JavaScript based control, but the drawback is that, once you want to add more than one instance of the control on a page, you will start facing a whole set of issues with the IDs and events of the control.These are the scenarios which necessitate the presence of a pre-built custom control, which can be simply dragged and dropped onto the UI and use it like other controls, namely textbox, gridview and so on, byt simply setting some properties and invoking some methods on it. At the same time, any customization required to the control's UI should not involve code and there should be a clear separation between UI and code behind logic of the control. This control is exactly meant for these purposes. It gives you a strong named assembly (so that you can deploy it in GAC, as well), which can be directly consumed in an ASP.Net project or even in a Share Point project which involves UI (Visual Web parts and so on). The control can be customized to expose more properties and methods as required. Once the assembly is added to the project, register it in the page using the Register tag and start using it like any other control. I have also provided a sample ASP.Net web site, whether I have demonstrated the use of the control. Since it is a server control (using Server list boxes and buttons), there will be screen flicker, while posting back. Hence in my web site, I have used it within Update Panel to avoid the flicker. Hope it is useful.

The following screen shot shows the appearance of the control on a page. Don't worry..;), you can definitely change the UI and styles of the control without much effort.

Note: I have moved my actual project hosted (now archived) in CodePlex at:

https://archive.codeplex.com/?p=associatedlistbox

associatedlistbox's People

Contributors

venh avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.