In your code behind:
protected string MyString = "This is my string";
Then, in your HTML page:
function GetMyString() {
return <%= MyString %>
}
You can obviously put the snippet
<%= MyString %> where ever you want to use that string. Hoe this helps!