Searched for a half an hour on this trying to find a solution.

I have a link and I just want to send through a variable depending on what linked was clicked back to the same page. I'm not good at javascript and I only need to use it in this one place.

<a href="#" onclick="javascript:document.all['myvar']='myVal';document.forms[0].submit();">

{text or image}

</a>

Is that correct? Im trying c# to read the var but with no luck.