To create a querystring with a # in it, from jquery, and read that value accurately in C# when the page loads
Use
encodeURIComponent()
before passing that.
Like:
var id="test # 232425 #454646"
"www.example.com?id=" + encodeURIComponent(id);
or just encode the entire url.
Result :
www.example.com?id=test # 232425 #454646";