Detect the files exist or not

  • Thread starter Thread starter Agnes
  • Start date Start date
A

Agnes

My asp.net web page will allow user to d/l the invoice and PO .
there are two buttons. (invoice and PO) in the datagrid ( i use repeater)
however, not every invoice got the PO , so I need to detect whether the PO
(pdf exists or not ), if the files doesn't exit, I need to make the button
's visible =.F.
How can I do that in aspx.vb

Thanks a lot
 
System.IO.File.Exists method will tell you if the file exists.

You need to handle ItemDataBound event for the repeater. In the event set
the button visibility depending on the System.IO.File.Exists method result.
 
Back
Top