Question: I have UL in my page, and it is empty.
I start populating it with LI using javascript.

How can I use this newly added dynamic data in the asp.net in the postback phase?

that is because my submit button is asp.net control.
I do not want to use JS POST.

thanks

Answer: 
I would propose

```
1 + getrand100() % 20 

```

for the first case (20) and

```
(getrand100()%2)*100 + getrand100()

```

for the latter (200).
The following is a generalized [Las Vegas-Algorithm](http://en.wikipedia.org/wiki/Las_Vegas_algorithm):

```
getRand(int upperBound){
  if (upperBound <= 1) { throw new IllegalArgumentException(); }
  // TODO: If random set should not start at 1, use another parameter as offset
  if (upperBound <= 50) {
    int num = getRand100();
    while (num > 100 - 100 % upperBound) {
      num = getRand100();
    }  
    return num % upperBound + 1;
  } else if (upperBound <= 100) {
    int num = getRand100();
    while (num > upperBound) {
      num = getRand100();
    }  
    return num;
  } else { 
    return getRand(upperBound / 100) * 100 - 100 + getRand(upperBound % 100);
  }
}

```