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

ASP.NET

 
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 
For that, you'll have to do more then check against a single number. The easiest way is to eat some casting cost and compare the current value to the one that you selected. Something like:

int controlValue = Int32.Parse(selectedValue);

int currentValue;

 

foreach (ListItem item in myDropDown.Items)

{

  currentValue = Int32.Parse(item.Value);

 

  if (currentValue < controlValue)

  {

    continue;

  }

 

  // Do Work

}   


will increment only numbers >= your selected value.

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

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 
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 
GeneralQuestion Pin
nithydurai9-Apr-08 2:27
nithydurai9-Apr-08 2:27 
GeneralRe: Question Pin
eyeseetee9-Apr-08 2:40
eyeseetee9-Apr-08 2:40 
GeneralRe: Question Pin
Ashish Sehajpal9-Apr-08 4:07
Ashish Sehajpal9-Apr-08 4:07 
Generalnetwork socket programming -connectivity issues Pin
vilasinivils9-Apr-08 2:05
vilasinivils9-Apr-08 2:05 
GeneralDynamic Control Events not Fireing Pin
André Stroebel9-Apr-08 1:34
André Stroebel9-Apr-08 1:34 
GeneralRe: Dynamic Control Events not Fireing Pin
Jesse Squire9-Apr-08 1:42
Jesse Squire9-Apr-08 1:42 
GeneralRe: Dynamic Control Events not Fireing Pin
André Stroebel9-Apr-08 1:53
André Stroebel9-Apr-08 1:53 
GeneralRe: Dynamic Control Events not Fireing Pin
Jesse Squire9-Apr-08 2:07
Jesse Squire9-Apr-08 2:07 

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.