Author: zhixuen | Posted on: 6/2/2010 5:53:13 AM | Views : 258

Hi All,
I have created a listbox that the selected items would remove by using javascript once I clicked on a server button.
Below is the code I'm using
 <asp:button id="btnSelected" Runat="server" CssClass="InputFormObject" Text=">" ></asp:button>" cssclass="InputFormObject" runat="server">
 <script language="javascript">
  function removeOptions(selectbox)
  {
  var i;
  for(i=selectbox.options.length-1;i>=0;i--)
  {
  if(selectbox.options[i].selected)
  selectbox.remove(i);
  }
  return false;
  }
</script>
private void Page_Load(object sender, System.EventArgs e)
  {
   // Put user code ...

Go to the complete details ...