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)
{
Response.Write("<table>");
int intstartrecord = 0;
int intrecordcount = 10;
while (intstartrecord <= intrecordcount)
{
Response.Write("<tr>");
Response.Write(@"<td id='columno' onclick='showvalue(this)' value=" + intstartrecord + ">" + intstartrecord + "</td>");
intstartrecord++;
Response.Write("</tr>");
}
Response.Write("</table>");
}
and here is the javascript function i put in the aspx file
<script type="text/javascript">
function showvalue(sender)
{
alert(sender.value);
}
</script>
On a closing note: use string builder to tailor the complete string and then do response.write only once that would be better.