This way:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/aes.js"></script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="txtText" runat="server" />
<asp:Button ID="BtnSubmit" Text="Proceed" runat="server" OnClientClick="return ValidateForm();" />
</div>
<script type="text/javascript">
function ValidateForm() {
var text = document.getElementById("<%=txtText.ClientID %>").value;
var encrypted = CryptoJS.AES.encrypt(text, "Secret Passphrase");
window.open("SimpelRepeater.aspx?key=" + encrypted);
}</script>
</form>
</body>
</html>
Refer this ;
https://gist.github.com/Xeoncross/5969760
aes encrypt in javascript and decrypt in c#