Trent L. Taylor (1/4/2012)
You can do it several ways.  You can use a POST operation instead of a GET.  GET operations expose the query string like you mentioned and is more limited in the length.  If you want to use a GET operation, you can encrypt it using the StrataFrame 3DES class or even create a Base64 output.Hi Trent.
I tried using the 3DES class but when I try to decrypt using this code:
String DecryptedSignOffID = _3des.Decrypt(Request["pk"].ToString());I wind up with this error instead of the web page:System.FormatException was unhandled by user code
  Message=Invalid length for a Base-64 char array.
  Source=mscorlib
  StackTrace:
       at System.Convert.FromBase64String(String s)
       at MicroFour.StrataFrame.Security.Encryption.TripleDESWrapper.Decrypt(String text)
       at StlCI_new.EditSignOff.Page_Load(Object sender, EventArgs e) in C:\StlCI_new\StlCI_new\StlCI_new\EditSignOff.aspx.cs:line 25
       at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
       at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
       at System.Web.UI.Control.OnLoad(EventArgs e)
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  InnerException: 
Now, the goofy thing is that just for grins and giggle, I tried decrypting the value right after I encypted it like so:
string EncrytedSignOffID = _3des.Encrypt(e.BusinessObject["sign_off_id"].ToString());string DecrytedSignOffID = _3des.Decrypt(EncryptedSignOffID);
and it was happy as a clam. So apparently, there is an issue trying to decrypt the string when it is used as part of a QueryString, but I have absolutely no idea what the problem could be.
Can you help?
TIA
Marcia