Quote:
<asp:Image ID="Image1" runat="server" ImageUrl='<%# "../xxxxxxx.ashx?ImID=" + EncodeID(Eval("id"))%>' Height="244px" Width="244px" EnableViewState="True" />
Actually the
ImageUrl
after rendered on Browser, would refer to a
Image Path rather than any
ID
.
That is because according to the code, it will dynamically bind the Path with the help of
ID
at
Server side. There will be no trace of
ID
or any parameters at the client side Browser.
You can check the
HTML
of Image on Browser by
Inspecting the Element.
However, if you want to protect the data, you can add some Encoding function and modify code as...
<asp:Image ID="Image1" runat="server" ImageUrl='<%# "../xxxxxxx.ashx?ImID=" + EncodeID(Eval("id"))%>' Height="244px" Width="244px" EnableViewState="True" />
Here
EncodeID()
is a function at
Code Behind, which would encode the
ID
and return you the Encoded
ID
.