Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>why to complicate , you can use row databound event for set the Uri , convert you querystring parameter and use Server.UrlEncode, and you are good to go</p> <p><strong>RowDataBoundEvent</strong></p> <hr> <pre><code>protected void YourGrid_RowDataBound(object sender, GridViewRowEventArgs e) { try { if (e.Row.RowType != DataControlRowType.DataRow) return; if (e.Row.DataItem == null) return; var hlobj= e.Row.FindControl("HYPERLINKID") as HyperLink; if ( null == hlViewTest) return; hlobj.NavigateUrl = String.Format("--------.aspx?whatever={0}", Server.UrlEncode(Encrypt(whatever))); } catch (Exception ex) { // } } </code></pre> <p><strong>Encryption Method :..........</strong></p> <hr> <pre><code> private static string Encrypt(String val) { try { var bytes = Encoding.UTF8.GetBytes(val.ToString(CultureInfo.InvariantCulture)); var encBytes = ProtectedData.Protect(bytes, new byte[0], DataProtectionScope.LocalMachine); return Convert.ToBase64String(encBytes); } catch (Exception ex) { return String.Empty; } } </code></pre> <p><strong>Decryption Method :------------</strong></p> <hr> <pre><code> private static string Decrypt(string val) { try { var bytes = Convert.FromBase64String(val); var encBytes = ProtectedData.Unprotect(bytes, new byte[0], DataProtectionScope.LocalMachine); return System.Text.Encoding.UTF8.GetString(encBytes); } catch (Exception ex) { return String.Empty; } } </code></pre> <p>At other Page , use like.........</p> <pre><code>var decryptedString=Decrypt(Request["YOUR PASSING ID"] || Request.QueryString["YOUR PASSING ID"])); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload