First you need to create a HiddenField on your webForm and name it TokenField (any name would actually do)
<asp:HiddenField ID=”TokenField” runat=”server” />
var textbox = document.getElementById(“TokenField”);
textbox.value = value;
To get the data stored in TokenField and use it in ASP.Net code behind use the next:
string token = TokenField.value;
Voila, you just used Javascipt and C# to use each other’s variables. I know that this might be basic for some of you, but for me it’s a life saver 🙂 As for CardSpace, I think it isn’t much in use on websites. What do you think?
For more info re CardSpace check this online tutorial or here