I implemented the small thing in C# but i guess you shuold be able to change it to VB easily. This is working as you expected it to be. Tell me if you specifically need to make it work using IDs i can do that too.
here is the code behind for that
protected void Page_Load(object sender, EventArgs e)
int intstartrecord = 0;
int intrecordcount = 10;
while (intstartrecord <= intrecordcount)
Response.Write(@"<td id='columno' onclick='showvalue(this)' value=" + intstartrecord + ">" + intstartrecord + "</td>");
On a closing note:
use string builder to tailor the complete string and then do response.write only once that would be better.