Asp.net ListBox Items(move to top,Move to bottom)
-
I have a listbox and MovetoTopbutton,MovetoBottombutton when i select an item in the listbox and if i click on MovetoTopbutton then the selected item should be placed in top of the listbox vise versa for MovetoBottombutton how to do this one.................
-
I have a listbox and MovetoTopbutton,MovetoBottombutton when i select an item in the listbox and if i click on MovetoTopbutton then the selected item should be placed in top of the listbox vise versa for MovetoBottombutton how to do this one.................
Someone else asked this a couple of posts down ( or you asked twice with two different accounts) . It's done with javascript, which means it's not really an ASP.NET question. Google for samples
Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
-
I have a listbox and MovetoTopbutton,MovetoBottombutton when i select an item in the listbox and if i click on MovetoTopbutton then the selected item should be placed in top of the listbox vise versa for MovetoBottombutton how to do this one.................
Here is a sample which moves the selected item up. You can revise to meet your need. protected void LinkButtonMoveUpProducts_Click(object sender, EventArgs e) { if (this.ListBoxProducts.SelectedIndex <= 0) { return; } int index = this.ListBoxProducts.SelectedIndex; ListItem li = this.ListBoxProducts.SelectedItem; this.ListBoxProducts.Items.Remove(li); this.ListBoxProducts.Items.Insert(index - 1, li); }
Welcome to www.softwaretree.net! You can find many excellent audio/video converter tools there!