By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,983 Members | 1,717 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,983 IT Pros & Developers. It's quick & easy.

How do I get sub procedure to know what cell was clicked in my asp:Table cell?

P: 38
I learned how to make a asp:Table with 88 cells with each cell having the name of a constellation and the cell has a number from 1 to 88 in it and that is what gets sent to the Sub procedure.
It worked fine with javascript but I want to learn asp.net/vb.net but now I am unable to communicate with the sub procedure in codebehind.
I coded the sub as [Sub DisplayContellations(selection)] where selection is the number that the cell has so I can tell which cell was clicked on.
I used [tempCell.Text = "<a href='#' onclick = ' DisplayConstellations(" & cellNum+1 & ")' runat='server' >" & ConName(cellNum+1) & "</a>"]
not like I did in javascript except I don't include [javascript:DisplayConstellations(" & cellNum+1 & ")]before the sub's name as it is a vb.net sub not javascript.
I am at a standstill now as I haven't found how to get the Sub to receive the selection from the selected cell.
Dec 22 '15 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.