﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WebForms (How do I?)  » How do I pass parameters to a web form without putting them in the querystring?</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Mon, 08 Jun 2026 23:46:11 GMT</lastBuildDate><ttl>20</ttl><item><title>How do I pass parameters to a web form without putting them in the querystring?</title><link>http://forum.strataframe.net/FindPost30770.aspx</link><description>Hi all.&lt;br/&gt;&lt;br/&gt;This a a very noobie question, but I do mostly winforms development. I need to create a web page that I can send a link to from my winofrms app. I do not want to put something like this:&lt;br/&gt;&lt;br/&gt;?pk=1010&amp;amp;user_id=akinsm&lt;br/&gt;&lt;br/&gt;in the URL for obvious reasons. My first impulse when I see things like this is to put in different values and see what I can see :)&lt;br/&gt;&lt;br/&gt;So, I am creating my web page using StrataFrame and I just need to know the best way to pass the parameters when I send the link from my winforms app.&lt;br/&gt;&lt;br/&gt;TIA&lt;br/&gt;&lt;br/&gt;Marcia</description><pubDate>Thu, 05 Jan 2012 12:48:51 GMT</pubDate><dc:creator>Marcia G Akins</dc:creator></item><item><title>RE: How do I pass parameters to a web form without putting them in the querystring?</title><link>http://forum.strataframe.net/FindPost30779.aspx</link><description>Hi all.&lt;br/&gt;&lt;br/&gt;I finally got this figured out. All I needed was this on the Decrypt:&lt;br/&gt;&lt;br/&gt;&lt;font color=#2b91af size=2 face=Consolas&gt;&lt;font color=#2b91af size=2 face=Consolas&gt;&lt;font color=#2b91af size=2 face=Consolas&gt;String&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2 face=Consolas&gt;&lt;font color=#000000 size=2 face=Consolas&gt; DecryptedSignOffID = _3des.Decrypt(Request[&lt;/font&gt;&lt;/font&gt;&lt;font color=#a31515 size=2 face=Consolas&gt;&lt;font color=#a31515 size=2 face=Consolas&gt;&lt;font color=#a31515 size=2 face=Consolas&gt;"pk"&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2 face=Consolas&gt;&lt;font color=#000000 size=2 face=Consolas&gt;].Replace(&lt;/font&gt;&lt;/font&gt;&lt;font color=#a31515 size=2 face=Consolas&gt;&lt;font color=#a31515 size=2 face=Consolas&gt;&lt;font color=#a31515 size=2 face=Consolas&gt;" "&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2 face=Consolas&gt;&lt;font color=#000000 size=2 face=Consolas&gt;, &lt;/font&gt;&lt;/font&gt;&lt;font color=#a31515 size=2 face=Consolas&gt;&lt;font color=#a31515 size=2 face=Consolas&gt;&lt;font color=#a31515 size=2 face=Consolas&gt;"+"&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2 face=Consolas&gt;&lt;font size=2 face=Consolas&gt;&lt;font color=#000000&gt;));&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font size=2 face=Consolas&gt;&lt;font size=2 face=Consolas&gt;&lt;font color=#000000&gt;&lt;/font&gt;&amp;nbsp;&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;/font&gt;</description><pubDate>Thu, 05 Jan 2012 12:48:51 GMT</pubDate><dc:creator>Marcia G Akins</dc:creator></item><item><title>RE: How do I pass parameters to a web form without putting them in the querystring?</title><link>http://forum.strataframe.net/FindPost30778.aspx</link><description>[quote][b]Trent L. Taylor (1/4/2012)[/b][hr]You can do it several ways.&amp;nbsp; You can use a POST operation instead of a GET.&amp;nbsp; GET operations expose the query string like you mentioned and is more limited in the length.&amp;nbsp; If you want to use a GET operation, you can encrypt it using the StrataFrame 3DES class or even create a Base64 output.[/quote]&lt;br/&gt;&lt;br/&gt;Hi Trent.&lt;br/&gt;&lt;br/&gt;I tried using the 3DES class but when I try to decrypt using this code:&lt;br/&gt;&lt;br/&gt;&lt;font face=Consolas&gt;&lt;font color=#2b91af&gt;String&lt;/font&gt;&lt;font size=2&gt;&lt;font size=2&gt; DecryptedSignOffID = _3des.Decrypt(Request[&lt;/font&gt;&lt;/font&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;&lt;font color=#a31515 size=2&gt;"pk"&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;font size=2&gt;].ToString());&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font size=2 face=Consolas&gt;&lt;font size=2 face=Consolas&gt;I&amp;nbsp;wind up with this error instead of the web page:&lt;/font&gt;&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;System.FormatException was unhandled by user code&lt;br/&gt;&amp;nbsp; Message=Invalid length for a Base-64 char array.&lt;br/&gt;&amp;nbsp; Source=mscorlib&lt;br/&gt;&amp;nbsp; StackTrace:&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Convert.FromBase64String(String s)&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at MicroFour.StrataFrame.Security.Encryption.TripleDESWrapper.Decrypt(String text)&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at StlCI_new.EditSignOff.Page_Load(Object sender, EventArgs e) in C:\StlCI_new\StlCI_new\StlCI_new\EditSignOff.aspx.cs:line 25&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Web.UI.Control.OnLoad(EventArgs e)&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Web.UI.Control.LoadRecursive()&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)&lt;br/&gt;&amp;nbsp; InnerException: &lt;br/&gt;&lt;br/&gt;Now, the goofy thing is that just for grins and giggle, I tried decrypting the value right after I encypted it like so:&lt;br/&gt;&lt;br/&gt;&lt;font color=#0000ff face=Consolas&gt;&lt;font color=#0000ff face=Consolas&gt;&lt;font color=#0000ff face=Consolas&gt;&lt;font size=2&gt;string&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size=2&gt;&lt;font face=Consolas&gt;&lt;font color=#000000 face=Consolas&gt; EncrytedSignOffID = _3des.Encrypt(e.BusinessObject[&lt;/font&gt;&lt;/font&gt;&lt;font color=#a31515 face=Consolas&gt;&lt;font color=#a31515 face=Consolas&gt;&lt;font color=#a31515 face=Consolas&gt;"sign_off_id"&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color=#000000 size=2 face=Consolas&gt;].ToString());&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;font size=2&gt;string&lt;font face=Consolas&gt;&lt;font color=#000000 face=Consolas&gt; &lt;/font&gt;&lt;/font&gt;&lt;font face=Consolas&gt;&lt;font color=#000000 face=Consolas&gt;DecrytedSignOffID = _3des.Decrypt(EncryptedSignOffID&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face=Consolas&gt;&lt;font face=Consolas&gt;&lt;font color=#000000 size=2&gt;);&lt;/font&gt;&lt;br/&gt;&lt;br/&gt;&lt;/font&gt;&lt;/font&gt;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.&lt;br/&gt;&lt;br/&gt;Can you help?&lt;br/&gt;&lt;br/&gt;TIA&lt;br/&gt;&lt;br/&gt;Marcia</description><pubDate>Thu, 05 Jan 2012 12:02:31 GMT</pubDate><dc:creator>Marcia G Akins</dc:creator></item><item><title>RE: How do I pass parameters to a web form without putting them in the querystring?</title><link>http://forum.strataframe.net/FindPost30774.aspx</link><description>[quote][b]Edhy Rijo (1/4/2012)[/b][hr]&lt;br/&gt;Hi Marcia, here is a quick sample on how to use the SF encryption class: &lt;a href="http://forum.strataframe.net/FindPost19605.aspx"&gt;&lt;a href="http://forum.strataframe.net/FindPost19605.aspx[/quote"&gt;&lt;a href="http://forum.strataframe.net/FindPost19605.aspx"&gt;http://forum.strataframe.net/FindPost19605.aspx&lt;/a&gt;&lt;/a&gt;[/quote&lt;/a&gt;]&lt;br/&gt;&lt;br/&gt;Thanks for the link, Edhy. I will look at it as soon as I get this page laid out and functioning.</description><pubDate>Wed, 04 Jan 2012 11:52:31 GMT</pubDate><dc:creator>Marcia G Akins</dc:creator></item><item><title>RE: How do I pass parameters to a web form without putting them in the querystring?</title><link>http://forum.strataframe.net/FindPost30773.aspx</link><description>[quote][b]Marcia G Akins (1/4/2012)[/b][hr]I will search the StrataFrame docs to see how to use the 3DES class&amp;nbsp;to do this and if I get stuck I will come back here crying for more help.[/quote]&lt;br/&gt;Hi Marcia, here is a quick sample on how to use the SF encryption class: &lt;a href="http://forum.strataframe.net/FindPost19605.aspx"&gt;&lt;a href="http://forum.strataframe.net/FindPost19605.aspx"&gt;http://forum.strataframe.net/FindPost19605.aspx&lt;/a&gt;&lt;/a&gt;</description><pubDate>Wed, 04 Jan 2012 11:23:16 GMT</pubDate><dc:creator>Edhy Rijo</dc:creator></item><item><title>RE: How do I pass parameters to a web form without putting them in the querystring?</title><link>http://forum.strataframe.net/FindPost30772.aspx</link><description>[quote][b]Trent L. Taylor (1/4/2012)[/b][hr]You can do it several ways.&amp;nbsp; You can use a POST operation instead of a GET.&amp;nbsp; GET operations expose the query string like you mentioned and is more limited in the length.&amp;nbsp; If you want to use a GET operation, you can encrypt it using the StrataFrame 3DES class or even create a Base64 output.&lt;br/&gt;[/quote]&lt;br/&gt;&lt;br/&gt;Hi Trent.&lt;br/&gt;&lt;br/&gt;Thanks for the speedy response. When I say that I am a noobie at webforms, i mean that I am REALLY a noobie :).&lt;br/&gt;&lt;br/&gt;Since my winforms app is going to e-mail a link to a single web page on which the e-mail recipient has only to input a couple of fields, I think that the quickest solution may be to encrypt the QueryString.&lt;br/&gt;&lt;br/&gt;I will search the StrataFrame docs to see how to use the 3DES class&amp;nbsp;to do this and if I get stuck I will come back here crying for more help.</description><pubDate>Wed, 04 Jan 2012 08:26:00 GMT</pubDate><dc:creator>Marcia G Akins</dc:creator></item><item><title>RE: How do I pass parameters to a web form without putting them in the querystring?</title><link>http://forum.strataframe.net/FindPost30771.aspx</link><description>You can do it several ways.&amp;nbsp; You can use a POST operation instead of a GET.&amp;nbsp; GET operations expose the query string like you mentioned and is more limited in the length.&amp;nbsp; If you want to use a GET operation, you can encrypt it using the StrataFrame 3DES class or even create a Base64 output.&lt;br/&gt;&lt;br/&gt;Another option is to use session variables between pages.&amp;nbsp; For example:&lt;br/&gt;&lt;br/&gt;&lt;span style="font-weight: bold;"&gt;Adding a Session Variable&lt;/span&gt;&lt;br/&gt;&lt;span&gt;[codesnippet]this.Session.Add("MyVariableName", MyValue)[/codesnippet]&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;span style="font-weight: bold;"&gt;Retrieving a Session Variable&lt;br/&gt;&lt;/span&gt;&lt;span&gt;[codesnippet]string myValue =&amp;nbsp; (string)this.Session["MyVariableName"][/codesnippet]&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;Hope this helps get you started.</description><pubDate>Wed, 04 Jan 2012 08:06:04 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>