I usualy use a datalist populted by my sproc and then use the CommandName and CommandValue options to pass the info I need into the datalist_itemcommand procedure in the code behind, but in this case I have a recursive call to create the data I want to display, basically a list of categories like this:
cat1
------>cat1.1
------------>cat1.1.1
------------>cat1.1.2
cat2
------>cat2.1
...and so on.
I've not found a way to bind that kind of view to a datalist or datagrid (at least not in a formatted way). I want each cat name to be a link which is captured by VB, in the datalist case that would be in the _ItemCommand procedure.
So, for now I am using a literal populated by HTML generated by my recursive procdure to display the categories in teh format above. I dont mind having to refresh the page (by passing a var in the QS as suggested), but I'm trying not to lose state as I have previous panels on the page which have data in a form I want to retain...