Add this in ur design page:
<asp:HiddenField ID="hdnResultValue" Value="0" runat="server" />
<asp:Button ID="Button1" runat="server" OnClientClick="returnString();"
Text="Button" onclick="Button1_Click" />
script for this:
<script language="javascript" type="text/javascript">
function returnString() {
debugger;
document.getElementById("hdnResultValue").value = "Tajuddin";
}
</script>
Now get the value of hiddenfield in code behind wherever u want like below:
string codeBehindValue = hdnResultValue.Value;