If you keep the actual key in a non-visible field, a bound
column with Visible=False, display some other field,
your requirements would be met.
You would extract the key field from the hidden field
in the handler.
Alternatively, though if the field is hidden, you could
encrypt the key in a seperate db field, using say SHA, and
then use the encrypted field in your hidden field and
save the decrypt on the second page.
Regards
Sink
>-----Original Message-----
>thanks for responding.
>
>unfortunately, that would encrypt the value after it is
displayed in the
>form.
>The encryption needs to prevent display at anytime.
>
>
>
>
>"Sink" <> wrote in message
>news:a28901c3b7df$a82e1c10$...
>> One way of doing this is to convert from a hyperlink to
>> a button column, they appear the same. Add an
>> OnItemCommand handler and in the OnItemCommand handler,
>> encrypt your id using whatever method you choose and the
>> call Response.Redirect("....?id=" + EncrytptedValue");
>> You have to extract the id from the e parameter wen the
>> OnItemCommand is called.
>> If you are using paging, make sure you add a check for
the
>> pager in your OnItemCommand handler (the pager is just
>> another ListItem)or paging will no longer work,
especially
>> as you are changing pages.
>> On your receiving page side, you decrypt your id and
>> forward you go.
>> The OnItemCommand is defined within the datagrid
definition
>> and the check line for the OnItemCommand Handler
>>
>> if(e.Item.ItemType == ListItemType.Pager)
>> return;
>>
>> Hope this helps,
>> Sink
>>
>> >-----Original Message-----
>> >how can I encrypt the querystring values for a
>> HyperLinkColumn ?
>> >
>> >in example below I would like to encrypt value for
field1
>> >================================================= =====
>> ><asp:HyperLinkColumn Text="View"
>> DataNavigateUrlField="field1"
>> >DataNavigateUrlFormatString="page.aspx?idx=
>> {0}"></asp:HyperLinkColumn>
>> >
>> >
>> >
>> >.
>> >
>
>
>.
>
|