Click here to Skip to main content
15,892,809 members
Home / Discussions / C#
   

C#

 
QuestionMoving or deleting files failing Pin
Ekjon14-Aug-08 6:37
Ekjon14-Aug-08 6:37 
AnswerRe: Moving or deleting files failing Pin
Manas Bhardwaj14-Aug-08 6:40
professionalManas Bhardwaj14-Aug-08 6:40 
AnswerRe: Moving or deleting files failing Pin
Le centriste14-Aug-08 6:46
Le centriste14-Aug-08 6:46 
GeneralRe: Moving or deleting files failing Pin
Ekjon14-Aug-08 7:31
Ekjon14-Aug-08 7:31 
QuestionPopulating a combobox from a collection Pin
Jonso14-Aug-08 5:47
Jonso14-Aug-08 5:47 
AnswerRe: Populating a combobox from a collection Pin
Giorgi Dalakishvili14-Aug-08 5:58
mentorGiorgi Dalakishvili14-Aug-08 5:58 
AnswerRe: Populating a combobox from a collection Pin
acqy14-Aug-08 21:03
acqy14-Aug-08 21:03 
QuestionSave sorted ListBox Items?? Pin
Imran Adam14-Aug-08 5:35
Imran Adam14-Aug-08 5:35 
Hi

I have a query with the ListBox control. I have two pages on my web app, a main page and a sort page.
The main page contains a table populated with names from a SQL database.
The sort page contains a ListBox with all the names from the main page and 2 buttons, Up and Down.
The user can move the names Up and Down by clicking the name and pressing Up or Down.

Now i would like to know, How can i save the 'sorted' listBox and display that order on the Main Page??

I would greatly appreciate some help.

Many Thanks

PS this is what i have for moving the items UP/Down

protected void Button1_Click(object sender, EventArgs e)
{
int i = lstBox1.SelectedIndex;

string str = lstBox1.SelectedItem.ToString();

if (i > 0)
{
lstBox1.Items.RemoveAt(i);
lstBox1.Items.Insert(i - 1, str);
lstBox1.SelectedIndex = i - 1;
}

}

-------------------
Redcastle CRM


AnswerRe: Save sorted ListBox Items?? Pin
Imran Adam14-Aug-08 5:37
Imran Adam14-Aug-08 5:37 
GeneralRe: Save sorted ListBox Items?? Pin
Manas Bhardwaj14-Aug-08 6:45
professionalManas Bhardwaj14-Aug-08 6:45 
AnswerCROSS POSTER. Pin
leckey14-Aug-08 14:35
leckey14-Aug-08 14:35 
QuestionConnection String to an Embedded MS Access Database Pin
Member 226514814-Aug-08 5:19
Member 226514814-Aug-08 5:19 
AnswerRe: Connection String to an Embedded MS Access Database Pin
Manas Bhardwaj14-Aug-08 5:34
professionalManas Bhardwaj14-Aug-08 5:34 
GeneralRe: Connection String to an Embedded MS Access Database Pin
Member 226514814-Aug-08 5:41
Member 226514814-Aug-08 5:41 
GeneralRe: Connection String to an Embedded MS Access Database Pin
Manas Bhardwaj14-Aug-08 6:39
professionalManas Bhardwaj14-Aug-08 6:39 
GeneralRe: Connection String to an Embedded MS Access Database Pin
Member 226514814-Aug-08 7:31
Member 226514814-Aug-08 7:31 
AnswerRe: Connection String to an Embedded MS Access Database Pin
Member 226514818-Aug-08 5:47
Member 226514818-Aug-08 5:47 
GeneralRe: Connection String to an Embedded MS Access Database Pin
Member 226514819-Aug-08 6:55
Member 226514819-Aug-08 6:55 
QuestionAccessing fields in a datatable Pin
maliary14-Aug-08 4:21
maliary14-Aug-08 4:21 
AnswerRe: Changing values in a datatable Pin
Colin Angus Mackay14-Aug-08 4:26
Colin Angus Mackay14-Aug-08 4:26 
GeneralRe: Changing values in a datatable Pin
maliary14-Aug-08 4:42
maliary14-Aug-08 4:42 
AnswerRe: Accessing fields in a datatable Pin
Manas Bhardwaj14-Aug-08 4:29
professionalManas Bhardwaj14-Aug-08 4:29 
QuestionRe: Accessing fields in a datatable Pin
maliary14-Aug-08 5:25
maliary14-Aug-08 5:25 
AnswerRe: Accessing fields in a datatable Pin
Colin Angus Mackay14-Aug-08 5:58
Colin Angus Mackay14-Aug-08 5:58 
GeneralRe: Accessing fields in a datatable Pin
maliary14-Aug-08 6:01
maliary14-Aug-08 6:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.