asp.net - Image datatype with file name as Link -


i have evidence field image datatype in table user in form enters data including image file , submits it. gets stored in database. field null

while retrieving , displaying on details view, file-name should displayed link

here have

 <asp:templatefield headertext="evidence (if any)">                     <itemtemplate>                         <asp:linkbutton id="lbevidence" runat="server" onclick="lbevidence_click" text='<%# eval("evidence").tostring() == string.empty ? "none" : eval("evidence") %>'                         postbackurl='<%#"~/_uilayer1/evidencepic.aspx?id="+eval("complaint_id") %>' > </asp:linkbutton>                     </itemtemplate>                  </asp:templatefield> 

it shows link button instead of file name says system.byte[]

please help.

that's because setting image blob (byte array) property text, of course string. when user submits image, should save filename db , bind text property.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

android - layout with fragment and framelayout replaced by another fragment and framelayout -