Detect the files exist or not

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
 
E

Eliyahu Goldin

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,052
Latest member
LucyCarper

Latest Threads

Top