How can you set the datanavigateurlformatstring dynamically so each row in a datagrid contains a unique URL? I have a database with a filename field:
x.doc
y.doc
z.doc
Each of the filenames in the filename field refer to a file saved in a directory on the webserver:
/savedfiles/x.doc
/savedfiles/y.doc
/savedfiles/z.doc
I want to display in each row of the datagrid a unique url referencing the files so the user can download each file:
Can I create datanavigateurlformatstring dynamically to do this?
Loading
Dhaval PatelPosted Jan 19, 2012, 12:09 AM
in your itemtemplate datanavigateurlformatstring take this type of file url.
Eval("field name")%>
in your item template for you want to download or open it.
but i give one suggestion for this if you are using static file name then same file exist and i am installed same name file than file is overwrite. so please change file name to your database field unique id means 1.doc ,2.doc etc.
Thanks & Regards
Dhaval Patel
This post help you than mark as Accepted Answer