I want to set the variables in the query string , like
new XAttribute("onclick", "javascript:document.location.href='/Controller/Action
?a=Va&b=Vb&c=Vc';"),
here Va, Vb and Vc are the variables. But if i wrote like this then on button click instead of passing Va, Vb and Vc values it passes these as a string.
I am assuming you want the variables from JavaScript and not the serverside.
If you want it on the serverside, it is simple string concat