Click here to Skip to main content
15,908,907 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionError Asp.net with mysql ? Pin
i gr89-Apr-08 2:58
i gr89-Apr-08 2:58 
AnswerRe: Error Asp.net with mysql ? Pin
eyeseetee9-Apr-08 3:18
eyeseetee9-Apr-08 3:18 
GeneralRe: Error Asp.net with mysql ? Pin
i gr89-Apr-08 4:14
i gr89-Apr-08 4:14 
AnswerRe: Error Asp.net with mysql ? Pin
Ashish Sehajpal9-Apr-08 4:00
Ashish Sehajpal9-Apr-08 4:00 
GeneralRe: Error Asp.net with mysql ? Pin
i gr89-Apr-08 4:16
i gr89-Apr-08 4:16 
GeneralRe: Error Asp.net with mysql ? Pin
Ashish Sehajpal9-Apr-08 7:45
Ashish Sehajpal9-Apr-08 7:45 
GeneralHighlighted New Record Pin
sjs4u9-Apr-08 2:57
sjs4u9-Apr-08 2:57 
AnswerRe: Highlighted New Record Pin
Ashish Sehajpal9-Apr-08 4:05
Ashish Sehajpal9-Apr-08 4:05 
Generalincrease values in a loop Pin
eyeseetee9-Apr-08 2:44
eyeseetee9-Apr-08 2:44 
GeneralRe: increase values in a loop Pin
Christian Graus9-Apr-08 2:59
protectorChristian Graus9-Apr-08 2:59 
GeneralRe: increase values in a loop Pin
Sandeep Akhare9-Apr-08 3:00
Sandeep Akhare9-Apr-08 3:00 
GeneralRe: increase values in a loop Pin
eyeseetee9-Apr-08 3:16
eyeseetee9-Apr-08 3:16 
GeneralRe: increase values in a loop Pin
eyeseetee9-Apr-08 3:30
eyeseetee9-Apr-08 3:30 
GeneralRe: increase values in a loop Pin
Jesse Squire9-Apr-08 3:42
Jesse Squire9-Apr-08 3:42 
GeneralRe: increase values in a loop Pin
eyeseetee9-Apr-08 3:47
eyeseetee9-Apr-08 3:47 
GeneralRe: increase values in a loop Pin
Jesse Squire9-Apr-08 4:23
Jesse Squire9-Apr-08 4:23 
GeneralRe: increase values in a loop Pin
eyeseetee9-Apr-08 4:47
eyeseetee9-Apr-08 4:47 
GeneralRe: increase values in a loop Pin
Sandeep Akhare9-Apr-08 3:45
Sandeep Akhare9-Apr-08 3:45 
GeneralRe: increase values in a loop Pin
Sandeep Akhare9-Apr-08 4:01
Sandeep Akhare9-Apr-08 4:01 
GeneralRe: increase values in a loop Pin
eyeseetee9-Apr-08 4:06
eyeseetee9-Apr-08 4:06 
GeneralRe: increase values in a loop Pin
Jesse Squire9-Apr-08 3:38
Jesse Squire9-Apr-08 3:38 
If you are always following the pattern that you illustrate above, with the items sorted, you may want to consider simply removing the lowest item in the list and adding a new item. Something similar to the following code would allow you to achieve your goal without needing to loop at all.

  int topValue = Int32.Parse(myDropDown.Items[myDropDown.Items.Count - 1].Value);

  string newValue = topValue++.ToString();

  myDropDown.Items.Add(new ListItem(newValue, newValue));

  myDropDown.Items.RemoveAt(0);



Hope that helps. Smile | :)

  --Jesse
"... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi

QuestionJavascript Pin
senthilsstil9-Apr-08 2:29
senthilsstil9-Apr-08 2:29 
GeneralRe: Javascript Pin
eyeseetee9-Apr-08 2:42
eyeseetee9-Apr-08 2:42 
GeneralRe: Javascript Pin
senthilsstil9-Apr-08 2:55
senthilsstil9-Apr-08 2:55 
GeneralRe: Javascript Pin
eyeseetee9-Apr-08 2:57
eyeseetee9-Apr-08 2:57 

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.